问题
I am using cygwin and I am trying to set up an .ssh/config file. Cygwin's folder is in my C: drive. My Home directory is C:\Users\USER. I have noticed that when I edit C:\Users\USER.ssh\config, cygwin does not even notice it (even though it notices the other files I have in my USER folder, i.e. .bashrc). But it does notice the config file if I put it in C:\cygwin64\home\USER.ssh\config.
Is there a way to get cygwin to read the .ssh folder in my USER home directory instead?
回答1:
Make sure your home directory setup in /etc/passwd matches /home/ Often it is not set at all (second to last field in the ':' delimited line. Then you'll need to restart your cygwin session (exit the terminal, and restart)
That should fix your problem.
回答2:
This isn't the greatest solution but it works:
ln -s /cygdrive/c/Users/username/.ssh /home/username/.ssh
If /home/username/.ssh already exists, perhaps rename it to .ssh_original or move the files into the other .ssh folder.
来源:https://stackoverflow.com/questions/18048959/why-wont-cygwin-read-the-ssh-config-file-in-my-home-directory