Prohibiting the root User to Remotely Log In to the System

The root user is the administrator of the Linux OS and has the permission to access all Linux system resources. The use of the root user to log in to the system and perform operations on the system will incur many potential security risks. Generally, you are advised to set PermitRootLogin in the /etc/ssh/sshd_config file to no. After the setting, the root user cannot log in to the system using SSH. This improves the system security. If you want to use the root permission to perform management operations, you can log in to the system as a common user and run the su or sudo command to switch to the root user. This can avoid logging in to the system directly with the root user, thereby reducing the risks of system attacks.