Disable SSH Root Login Disabling root login via SSH Disabling SSH root login will add an extra layer of security. It would be more secure to brute forceattacks or in case your password is stolen. Create a non-root useradduser usernamepasswd username Open the ssh configuration file with your editor.vi /etc/ssh/sshd_config Add the line “PermitRootLogin no.” Or uncomment the line "#PermitRootLogin yes" andchange yes to no.#LoginGraceTime 2m#PermitRootLogin yes#StrictModes yes#MaxAuthTries 6#MaxSessions 10PermitRootLogin no Save and exit the file. Restart the ssh servicesystemctl restart sshd.service