5
回答
openssh如何配置启动sshd问题
开发十年,就只剩下这套Java开发体系了   

安装openssh是自动安装的。运行


sshd start
出现:
sshd re-exec requires execution with an absolute path

再运行

/usr/sbin/sshd
出现
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.
于是我就用
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
 ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key

在上面设置中,如果设置了密码,运行

/usr/sbin/sshd
还是出现

Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.

如果不设置密码,就可以正常运行,这是什么原因呀。都研究了两三天了,还没有搞定。



举报
tngou
发帖于6年前 5回/9K+阅
顶部