Brad Lucas

Programming, Clojure and other interests
July 12, 2006

Cygwin Ssh Doesn’T Find Config

After installing Cygwin and setting up a new home directory with a .ssh directory and a config file. You may find that you need to run ssh with -F to help it find the ~/.ssh/config file.

If this is the case. Double check that $HOME is set correctly. Next look at your entry in /etc/passwd. If you find that it has a different home directory you’ve found the problem. Turns out ssh doesn’t look at $HOME but to the setting in /etc/passwd.

One easy way to fix this is with mount. Mount the incorrect home in /etc/passwd to the correct one. For example, my incorrect home is /etc/brad and the correct is c:\home\brad. This is fixed with the following.

mount -s -f c:\\home\\brad /home/brad
Tags: cvs