走了很多坑,总是提示:
The client has disconnected from the server.Reason:
Unable to authenticate using any of the configured authentication methods.
总算找到了方法:
1. 切换root用户: sudo -i
2. 设置root密码:passwd root
3. 以下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 并不好使!