使用cygwin安装sshd

使用cygwin安装sshd,cygwin,sshd,Cygwin,Sshd,我想使用cygwin在windows中安装sshd。但当我启动sshd服务时,它会说: The CYGWIN sshd service is starting. The CYGWIN sshd service could not be started. The service did not report an error. More help is available by typing NET HELPMSG 3534. 而sshd.log则显示: Permissions 0660 for

我想使用cygwin在windows中安装sshd。但当我启动sshd服务时,它会说:

The CYGWIN sshd service is starting.
The CYGWIN sshd service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
sshd.log
则显示:

Permissions 0660 for '/etc/ssh_host_dsa_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /etc/ssh_host_dsa_key
Could not load host key: /etc/ssh_host_dsa_key

那么如何处理呢?

您需要确保只有cyg_服务器用户才能访问这些密钥

chown cyg_server /etc/ssh*
chmod 600 /etc/ssh*

这些命令正是这样做的,并将允许您的sshd正确运行。

My/var/log/sshd.log最终实现了以下功能:

Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.
/var/empty must be owned by root and not group or world-writable.
/var/empty must be owned by root and not group or world-writable.
/var/empty must be owned by root and not group or world-writable.
/var/empty must be owned by root and not group or world-writable.
查看/var,我看到了以下内容:

$ ls /var -All
total 0
drwxrwxr-x+ 1 xxxx       None 0 Dec  8 15:59 cache
drwxrwxr-x+ 1 cyg_server root 0 Dec  8 16:21 empty
drwxrwxr-x+ 1 xxxx       None 0 Dec  8 15:58 lib
drwxrwxrwx+ 1 xxxx       None 0 Dec  8 16:27 log
drwxrwxrwx+ 1 xxxx       None 0 Dec  8 15:48 run
drwxrwxrwt+ 1 xxxx       None 0 Dec  8 15:48 tmp

所以我刚刚做了
chmod600/var/empty
,这就解决了它

我不知道如何访问sshd.log文件(
cat/var/log/sshd.log
返回空白,甚至我的
ls
返回空白?),但我应用了您说明的两个命令,仍然无法连接。有什么想法吗?如果我
print/var/log/sshd.log
它返回以下内容:
无法初始化设备PRN
。希望其他人能提供更多帮助。。。要真正做到这一点需要付出很多努力,我只安装了一次W7。你是按照指南来设置的吗?是的,首先我看了一段Youtube视频,然后在两个博客上开始,但都没用。我的电脑有点旧了;我在周一开始一项新工作,并将在他们为我提供新电脑时重试。