Why won't cygwin read the .ssh/config file in my home directory?

半腔热情 提交于 2021-02-19 02:50:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!