Cygwin's ssh isn't reading my config file at %HOME%/.ssh/config
.
I have Cygwin installed, but I prefer to use the DOS-like environment on Windows. I have the Cygwin bin directory in my PATH
and I often use the Unix-like commands outside of Cygwin.
Since I'm not logging in to Cygwin (or executing .bashrc), I expected the commands to use the environment variables set by Windows. HOME
is set to C:\Users\Vince
and I expected ssh to find the config file in C:\Users\Vince\.ssh\config
, but that doesn't happen unless I use the -F
option to tell it to look there.
How do I tell where Cygwin's ssh is looking for the config file? Can that be changed?
Thank you.
Best Answer
Here is my answer based on the q&a we had in the comments.
By default, Cygwin will create a user home directory in
/home/User
, on a windows system, out home directory is somewhere else -To fix this, open
/etc/nsswitch.conf
and edit in this lineClose all Cygwin terminal sessions and relaunch. Now again
echo $HOME
and you should see that it should now be set to the windows%HOME%
, and no longer use the one located in/home
edit
You may also need to remove
As this should now be deferred to windows.