Cygwin Openssh看不到/ etc / sshd_config [英] Cygwin Openssh can't see /etc/sshd_config

查看:482
本文介绍了Cygwin Openssh看不到/ etc / sshd_config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法获得openssh服务器在Windows Server 2008上的工作。我有它在其他两个服务器上工作,但其中一个只是不能工作。

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.

我运行 ssh-host-config ,并选择权限分离。创建两个用户 sshd sshd_server

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

我运行 net start sshd ,我看到了:

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

The service did not report an error.

然后我运行 cat /var/log/sshd.log

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

/etc/sshd_config: No such file or directory

然后我检查 / etc / sshd_config

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

现在,似乎sshd看不到一个文件,并且有正确的权限。即使在Windows上,该文件由 sshd_server 所有。

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.

推荐答案

这也发生了。
一个Procmon会话告诉我,sshd服务试图在根目录c:\etc而不是c:\cygwin\etc中找到/ etc。

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.

进一步的调查显示,sshd加载了一个不正确的cygwin1.dll,它居住在我的系统PATH环境变量中。

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

解决方案是要么删除坏的cygwin1.dll或从系统变量中删除坏路径并将其分配给用户特定的环境变量的路径。

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.

之后,在没有这个坏路径的专用用户下运行sshd守护程序。

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

感谢标记

这篇关于Cygwin Openssh看不到/ etc / sshd_config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆