How to Disable Direct root SSH login - HPUX
1. #find / -name "sshd_config"
/opt/ssh/etc/sshd_config
/opt/ssh/newconfig/opt/ssh/etc/sshd_config
/opt/ssh/src/ssh/sshd_config
# cd /opt/ssh/etc
#cat sshd_config |grep -i PermitRootLogin
PermitRootLogin yes
# vi sshd_config
2. vi the sshd_config file and change below line:
PermitRootLogin no
save and exit
3. Recheck the sshd_config file.
#cat sshd_config |grep -i PermitRootLogin
PermitRootLogin no
4. Then stop and restart SSH.
# /sbin/init.d/secsh stop
# /sbin/init.d/secsh start
You will not be able to do ssh as root now.
1. #find / -name "sshd_config"
/opt/ssh/etc/sshd_config
/opt/ssh/newconfig/opt/ssh/etc/sshd_config
/opt/ssh/src/ssh/sshd_config
# cd /opt/ssh/etc
#cat sshd_config |grep -i PermitRootLogin
PermitRootLogin yes
# vi sshd_config
2. vi the sshd_config file and change below line:
PermitRootLogin no
save and exit
3. Recheck the sshd_config file.
#cat sshd_config |grep -i PermitRootLogin
PermitRootLogin no
4. Then stop and restart SSH.
# /sbin/init.d/secsh stop
# /sbin/init.d/secsh start
You will not be able to do ssh as root now.
Thanks...
Kiran Jadhav
**Let's Share our knowledge and keep visiting here**
No comments:
Post a Comment