SSH Server缺少Key错误
2015-02-11 15:15:35 2015-02-11 15:15:35
最近在新装一个KVM的时候,偷懒直接用它的镜像,结果装了后用putty连不上去。重启后发现缺少Key的错误
/etc/init.d/ssh restart
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
解决方法是自己建立这两个key,用下面两条命令
ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
之后再重启SSH应该就可以了