Published on Friday, February 15th, 2008 at 9:26 pm

Many data centers disable direct root login to servers for security reason. You need to login first as a normal user than su to login as root.

But i like direct login as root. So i disabled this extra security on my servers. If some one can get my root password, they can also get my normal users password. So what i do is use complicated root password and keep it secure.

To enable or disable root login, you need to set this in /etc/ssh/sshd_config file.

# cd /etc/sshd
# vi sshd_config

To disable direct root SSH login, you need to add following to /etc/ssh/sshd_config

PermitRootLogin no

To enable direct root SSH login, you need to add following to /etc/ssh/sshd_config

PermitRootLogin yes
After you do the changes, save and exit. Then restart sshd.

On FreeBSD

#/etc/rc.d/sshd restart

On Linux

#/etc/init.d/sshd restart

Related Posts

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>