Disable root login in SSH
SSH by default allow everyone in the local system with a login shell to login remotely through SSH. This includes the root user. The option to whether allow root login or not is PermitRootLogin in the /etc/sshd_config configuration file. If it is not set, SSH daemon will allow root login.
For security reason it’s good to disable root login, and this can be done by adding the following line to the configuration file;
PermitRootLogin no
To have the changes take effect, the SSH daemon need to reload the edited configuration file with the following command;
# /etc/init.d/ssh reload
In some Linux distribution, the command is as the following;
# /etc/init.d/sshd reload
Posted on 28.08.2008 and categorized under linux