Cygwin Openssh can't see /etc/sshd_config

霸气de小男生 提交于 2019-12-24 00:58:20

问题


I can't get the openssh server to work on Windows Server 2008. I have it working on two other servers, but one of them just won't work.

I run ssh-host-config, and choose privilege separation. Two users are created sshd and sshd_server.

Then I run net start sshd, and I see this:

The CYGWIN sshd service is starting.
The CYGWIN sshd service could not be started.

The service did not report an error.

Then I run cat /var/log/sshd.log and I see this output:

/etc/sshd_config: No such file or directory

I then check permissions on /etc/sshd_config:

-rw-r--r-- 1 sshd_server root 3344 Sep   7 09:15 /etc/sshd_config

So now, it seems sshd cannot see a file which is there and has the right permissions. Even on windows, that file is owned by sshd_server.


回答1:


had this happen too . a Procmon session revealed to me that the sshd service was trying to locate /etc in the root directory c:\etc instead of c:\cygwin\etc.

further investigation showed that sshd was loading an incorrect cygwin1.dll which was living in my system PATH environment variable.

solution was to either to remove the bad cygwin1.dll or remove the "bad" path from the system variables and assigning that path it to user specific environment variables.

afterwards running the sshd daemon under a dedicated user who did not have this "bad "path worked as it should.

thanks mark



来源:https://stackoverflow.com/questions/12319215/cygwin-openssh-cant-see-etc-sshd-config

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