1、重新设置root 密码命令: sudo passwd root 2、sudo chmod 777 /etc/ssh/sshd_config 用完再把权限改回来 3、vi /etc/ssh/sshd_config 找到 PasswordAuthentication no,将no改为yes; 去掉 #UsePAM no 前面的井号; 退出保存, :qw 4、重启AWS VPS,就可以使用root正常登陆了 sudo service ssh restart 5、sudo chmod 755 /etc/ssh/sshd_config