1 编辑vim /etc/ssh/sshd_config文件
把PermitRootLogin Prohibit-password 添加#注释掉
新添加:PermitRootLogin yes
更改PermitEmptyPasswords为 no
2 然后重启ssh服务
service ssh restart(或者执行:/etc/init.d/ssh restart)
3.重启服务器
shutdown -r now
来源:https://blog.csdn.net/zyx_ly/article/details/84957298