2

我无法让 openssh 服务器在 Windows Server 2008 上运行。我让它在另外两台服务器上运行,但其中一台无法运行。

我运行ssh-host-config,并选择权限分离。创建了两个用户,sshd并且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,我看到了这个输出:

/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.

4

1 回答 1

2

这也发生过。Procmon 会话向我显示 sshd 服务试图在根目录 c:\etc 而不是 c:\cygwin\etc 中定位 /etc。

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

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

之后在没有这个“坏”路径的专用用户下运行 sshd 守护程序,它应该正常工作。

谢谢标记

于 2013-08-09T14:31:24.673 回答