Friday, March 02, 2007

Solving Pesky ssh Issues in Cygwin

Every time that I re-install cygwin and I use ssh for the first time, I encounter minor annoyances. My biggest annoyance is the fact that no matter how many times I log into a remote machine, cygwins' ssh utility tells me the following:

Could not create directory '/home/ME/.ssh'.
The authenticity of host ' (1xx.82.67.xx)' can't be established.
RSA key fingerprint is 6c:59:15:64:ed:c8:67:35:d6:ed:1c:a2:ee:87:2b:3f.
Are you sure you want to continue connecting (yes/no)?
Once I enter 'yes', I get the following:

Failed to add the host to the list of known hosts (/home/ME/.ssh/known_hosts).

So that message occurs every single time that I attempt to login to the remote machine.

So the question is, how do I solve this problem? The solution was actually quite simple!

First locate the file called 'passwd' in your C:\path\to\cygwin\etc directory and open it with wordpad.

Second, replace the text
/cygdrive/c/Documents and Settings/YOUR_NAME

Finally, save the file.

In hindsight, the solution is very straightforward, but it took me hours to finally figure out. Hopefully, I can save your time!