Prohibit root remote login solution

The root user in linux is a super administrator, who can brute force crack passwords against the root user, which is very unsafe. In work, we generally prohibit the root user from directly logging in remotely, and open one or more ordinary users. Only ordinary users are allowed to log in. If necessary With the root user, you can switch to root with su or sudo to execute commands with root privileges.

1. Root cannot log in remotely, but all users can switch root

First open the configuration file:

vim /etc/ssh/sshd_config

Guess you like

Origin blog.csdn.net/taoxicun/article/details/132628187