Disable root login in SSH

Certain SSH server is configured to not allow root login mainly due to security and audit reason. You can disallow root login to your server with these simple steps;

  1. Set PermitRootLogin to no in /etc/ssh/sshd_config
    PasswordAuthentication no
  2. Reload or restart SSH

Sign up for Complete Secure Shell Course and many other great courses on Udemy to learn more.


Written by Mohd Shakir Zakaria. Last updated on 2019-02-12