Could not load host key: /etc/ssh/ssh_host_rsaxxx

/usr/sbin/sshd

错误提示:

Could not  load host key: /etc/ssh/ssh_host_rsa_key

Could not  load host key: /etc/ssh/ssh_host_ecdsa_key

Could not  load host key: /etc/ssh/ssh_host_ed25519_key

sshd: no hostkeys available  -- exiting.

 

解决方法:

ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N ''
ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key -N ''

再执行

/usr/sbin/sshd

你可能感兴趣的:(linux日常错误记录)