运行 /usr/sbin/sshd ,系统报错:
Could not load host key: /etc/ssh_host_rsa_key
Could not load host key: /etc/ssh_host_dsa_key
生成所需的密钥
/usr/bin/ssh-keygen -t rsa -f /etc/ssh_host_rsa_key
/usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key
然后就可以启动 sshd 服务了:
/usr/sbin/sshd
had you try it ??
why there is same command ??
/usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key
/usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key
Sorry!
It’s a mistake.
Should be rsa and dsa.
也许需要sudo一下。