OpenSSH: disable root access

As part of the OpenSSH package there is a tool called ssh that allows you to remotely log into your servers in a safer way than, say, telnet.

Despite the fact that ssh clients provides a more secure way to login into your machines, it is a good practice to disable root access, keeping your sytem a bit more secure.

Edit the /etc/sshd_config file and change…

PermitRootLogin yes

to look like…

PermitRootLogin no

Save the changes and restart sshd. Now you can login with a less privileged account and su to root when you need to administer the system.

ssh non_privileged_user@yoursystem
su -

With this little tip your root password will never pass through the wire and your system will remain a bit more secure.

One Response to “OpenSSH: disable root access”

  1. [...] Disable root login for OpenSSH as it is unsafe to login as root (we only allow root to login when Dropbear SSH server is running during startup and restrict root all other times): ## change in /etc/ssh/sshd_config PermitRootLogin no [...]

Leave a Reply

You must be logged in to post a comment.