我错过了什么?我在 unix 机器上更改 root 密码,然后尝试使用该密码登录。 PasswordAuthentication设置为yesinsshd_config并且sshd守护程序已重新启动。无论我是远程登录还是本地登录,都会发生这种行为:
root@ip-10-0-0-155:~# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ip-10-0-0-155:~# ssh root@127.0.0.1
root@127.0.0.1's password:
Permission denied, please try again.
root@127.0.0.1's password:
Run Code Online (Sandbox Code Playgroud)
TOC*_*TOC 13
检查此文件:/etc/ssh/sshd_config并搜索该行:
PermitRootLogin no
替换为:
PermitRootLogin yes
Run Code Online (Sandbox Code Playgroud)