Thursday, 25 June 2015

Disable the root SSH login

For security reasons, we might need to disable the 'root' user SSH login for the Linux system. This can be easily done by editing the sshd_config file as the 'root' user.

    First, open up the file in any text editor:

    vi /etc/ssh/sshd_config

 
   Next, find the following line:

    #PermitRootLogin no

    The line is currently commented. Uncomment it, and that's all you need to do. Save the file, and restart the ssh service.

    /etc/init.d/sshd restart