Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using cygwin on WinXP to connect via ssh to a linux system. The remote linux system consists of three virtual machines (VM) running in VirtualBox. The RSA key is different for each VM even though the IP is the same. When I try and connect via ssh from cygwin, the command waits 30 to 40 seconds, then drops back to the prompt with no error messages. From either DOS or OSX, it connects no problem. I would have expected a .ssh directory where I could poke around the known_hosts file, or just delete it and start new, but it's not there. At some point in the past, I could connect, but have no idea what sequence of actions I took to break it.

Is there some directory or file where I can reset ssh?

share|improve this question
What if you just type the password during those 30..40 seconds? –  Arjan Oct 5 '09 at 17:30
what do you mean from DOS, how are you doing ssh from DOS, how are you doing DOS (if you even mean DOS) –  barlop Apr 13 at 11:50

2 Answers 2

Cygwin's ssh does create a .ssh directory. If I recall correctly, your home directory is set to be C:\Documents and Settings\*username*. The .ssh directory should be under there. It's probably easier to just ask the shell to take you to your home directory using cd ~. From your cygwin prompt:

$ cd ~/.ssh
$ ls -a

You should find your known_hosts file in there.

To diagnose further, add one or more -v options to the command line:

$ ssh -v otherhost
$ ssh -vv otherhost

You'll get more output with each additional -v (up to 3).

share|improve this answer
The .ssh directory does not exist. –  dacracot Oct 5 '09 at 15:07
maybe cygwin doesn't have access to write to the directory –  Roy Rico Oct 5 '09 at 18:17
Can you show the value of $HOME here? I did a clean install of cygwin in a VM, launched rxvt (non-X version) and my $HOME directory didn't exist. When I ran Cygwin.bat, my $HOME did exist. When I ran ssh, it created ~/.ssh –  Doug Harris Oct 5 '09 at 19:07
I think newer cygwin installs point /home to C:\Documents and Settings, but older installs would put it under the cygwin root directory. If you installed cygwin to C:\cygwin, it would be C:\cygwin\home. –  quack quixote Oct 5 '09 at 22:07
You write "Cygwin's ssh does create a .ssh directory" <--- Maybe Cygwin ssh might not necessarily create .ssh by default, though always trivial to mkdir it. Though I note that in your test it did. –  barlop Apr 13 at 11:52

Install the findutils package in Cygwin and run updatedb, then type "locate known_hosts".

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.