Disable root login

Using the root user to access the SSH server is not a good practice. Always access the SSH server using non privileged user accounts.

  1. Open the configuration file.

sudo nano /etc/ssh/sshd_config
  1. Disable the root login using the PermitRootLogin option.

PermitRootLogin no

Now the root login is disabled and the SSH server can only be accessible by a non root user.

Last updated