升级完openssh后无法登录主机
通过telnet登录上去
查看/var/log/message文件,或者sshd -t检查服务

看报错应该是权限导致的
解决办法:
chmod 600 /etc/ssh/ssh_host_rsa_key
chmod 600 /etc/ssh/ssh_host_ecdsa_key
chmod 600 /etc/ssh/ssh_host_ed25519_key
本文解决了一个常见问题:升级openssh后无法登录主机。通过调整权限,具体为将/etc/ssh目录下的ssh_host_rsa_key、ssh_host_ecdsa_key和ssh_host_ed25519_key的权限设置为600,成功解决了因权限导致的登录失败。
升级完openssh后无法登录主机
通过telnet登录上去
查看/var/log/message文件,或者sshd -t检查服务

看报错应该是权限导致的
解决办法:
chmod 600 /etc/ssh/ssh_host_rsa_key
chmod 600 /etc/ssh/ssh_host_ecdsa_key
chmod 600 /etc/ssh/ssh_host_ed25519_key

被折叠的 条评论
为什么被折叠?