Disable root SSH login : How to ??



Disable Root SSH Login on HP UX

# cd /opt/ssh/etc

# vi sshd_config

Change the line:

PermitRootLogin yes

change into like below

PermitRootLogin no

save and exit

Then stop and restart SSH.

# /sbin/init.d/secsh stop

# /sbin/init.d/secsh start

You will then NOT be allowed to ssh as root.

==============================================


Disable Root SSH Login on Linux



 #vi /etc/ssh/sshd_config

Find this section in the file, containing the line with “PermitRootLogin” in it.

    #LoginGraceTime 2m
    #PermitRootLogin no
    #StrictModes yes
    #MaxAuthTries 6

Make the line look like this to disable logging in through ssh as root.

    PermitRootLogin no

Then  restart the sshd service:

   # /etc/init.d/sshd restart




Post a Comment

1 Comments