Home > Security, Uncategorized > How to disable root login in linux

How to disable root login in linux

April 30th, 2012 Leave a comment Go to comments

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

 

 

Categories: Security, Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.