问题1
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
Could not load host key: /etc/ssh/ssh_host_ed25519_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.
解决办法:
ssh-keygen -t rsa -f /etc/ssh/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ""
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
问题2
WARNING: Your password has expired. You must change your password now and login again!
# cat /etc/shadow
root:$1$m.jegaqA$vA.rBTVryyUAcRvyZ2gOL1:0:0:99999:7:::
telnetd:$1$N4uZUEcU$yotoDExxgGXs6PE7PQuIR1:0:0:99999:7:::
honey:$1$SwtHyL/h$MsEX6Vnqz/qhwDsivDqD20:0:0:99999:7:::
sshd:$1$elylgRon$FOHgkwpPMcNI5s.iL8ZS/.:0:0:99999:7:::
这样的话,使用SSH登录就会出现用户登录失败,提示诸如“WARNING: Your password has expired. You must change your password now and login again!”等等。
需要手工修改,大致如下:
# cat /etc/shadow
root:$1$m.jegaqA$vA.rBTVryyUAcRvyZ2gOL1:15695:5:99999:7:5:20000:
telnetd:$1$N4uZUEcU$yotoDExxgGXs6PE7PQuIR1:15695:5:99999:7:5:20000:
honey:$1$SwtHyL/h$MsEX6Vnqz/qhwDsivDqD20:15695:5:99999:7:5:20000:
sshd:$1$elylgRon$FOHgkwpPMcNI5s.iL8ZS/.:15695:5:99999:7:5:20000:
阅读(10222) | 评论(0) | 转发(0) |