How to Disable Direct Root Login for SSH

Well everyone knows that 'root' is the administrator of your linux system, so by denying 'root' remote access to ssh into your system.

1. As root, first login and open

    vi /etc/ssh/sshd_config

2. In there find (or create) a line that reads


   Quote

   # Authentication:
   #LoginGraceTime 120
    PermitRootLogin no
    #StrictModes yes

The line PermitRootLogin no is the important one. Note there is no # in front of it.

3. Once you have made thos changes, save the file (esc then :wq).

4. Restart sshd (service sshd restart).

Try to login from other system to ssh modified system. you can't loggin.

0 comments:

Post a Comment