How to allow root user to log in remotely

By default, the root user can connect directly or log in remotely from other servers through SSH.

However, sometimes direct connection and remote login of the root user are restricted. How to remove this restriction?

One modify the /etc/ssh/sshd_config file

① Ensure that the PermitRootLogin parameter value is yes

② If there is an AllowUsers display that specifies that certain users can log in, add the root user

③ Make sure there is no DenyUsers root

Second restart ssh

service sshd restart or /etc/initd.d/sshd restart

Guess you like

Origin blog.csdn.net/yabignshi/article/details/113055752