Disabling Remote Login Using the root Account
root is a super privileged user in Linux systems with access permissions to all system resources. Allowing direct root logins to perform system operations poses potential security risks. Generally, it is advised to set the PermitRootLogin parameter to no in the /etc/ssh/sshd_config file. Once configured, the root user cannot log in to the system using SSH, thereby enhancing system security. If root privileges are required for management tasks, you can log in as a common user first, and then switch to the root user using the su or sudo command. This practice prevents direct root logins and reduces the risk of malicious attacks on the system.
Parent topic: Security Hardening