Symptoms:
-
Use Xshell access ubuntu server, can not connect
-
xshell test non-root user, you can connect properly, but still can not access the root user
Solution:
-
Modify the
/etc/ssh/sshd_config
file toPermitRootLogin Prohibit-password
add#
comment out -
New add:
PermitRootLogin yes
-
Restart the ssh service
/etc/init.d/ssh restart
-
Reuse root connection, ok!
Reprinted link: https://blog.csdn.net/qq_35445306/article/details/78771398
Reference Links: https://www.cnblogs.com/vitre/p/5227456.html