使用 cygwin 安装 sshd

use*_*055 5 cygwin sshd

我想在windows中使用cygwin安装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.
Run Code Online (Sandbox Code Playgroud)

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
Run Code Online (Sandbox Code Playgroud)

那么该如何处理呢?

dan*_*man 3

您需要确保只有 cyg_server 用户可以访问这些密钥。

chown cyg_server /etc/ssh*
chmod 600 /etc/ssh*
Run Code Online (Sandbox Code Playgroud)

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