走了很多坑,总是提示:
The client has disconnected from the server.Reason:
Unable to authenticate using any of the configured authentication methods.
总算找到了方法:
- 切换root用户: sudo -i
- 设置root密码:passwd root
- 以下3条命令:
- sed -i ‘s/PermitRootLogin no/PermitRootLogin yes/g’ /etc/ssh/sshd_config;sed -i ‘s/PasswordAuthentication no/PasswordAuthentication yes/g’ /etc/ssh/sshd_config;reboot
- 一定要reboot,别听那些人乱说,service sshd restart 并不好使!
评论前必须登录!
注册