1.
Edit
/etc/ssh/sshd_config with your favorite text editor.
[root@root ~]# vi
/etc/ssh/sshd_config
Change this
line:
#PermitRootLogin yes
Edit to this:
PermitRootLogin no
2.
Ensure that you are logged into the box with
another shell before restarting sshd to avoid locking yourself out of the
server.
[root@root ~]# /etc/init.d/sshd
restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
[root@root ~]#