Friday, July 29, 2011

preventing root user or account from ssh


This post explains how to prevent root user to ssh directly to a linux box. This is tested in redhat rhel5 system and works on almost other linux distros.

Open the ssh configuration file
# vi /etc/ssh/sshd_config
Changethe following line
PermitRootLogin yes
PermitRootLogin no

Now restart the ssh demon.
/etc/init.d/sshd restart

No comments:

Post a Comment

Be nice. That's all.