How to disable root login in linux

 Login to shell.

Copy and paste below command to server using your favourite editor.
pico -w /etc/ssh/sshd_config

Find the line
Protocol 2, 1

Uncomment it and change it to look like
Protocol 2

Next, find the line
#PermitRootLogin yes

Un-comment it. It looks like
PermitRootLogin no

Save the file Ctrl+X then Y then enter

Now restart the SSH service on server
/etc/rc.d/init.d/sshd restart