Thursday, March 8, 2012

How to Disable root Access on SSH Login

SSH is a network protocol use for remote a machine. you can read more about SSH by clicking here to directly move to landing page.


let's start our configuration by configuring sshd_confing file, follow this command below,
 nano /etc/ssh/sshd_config

Look at this picture below,


find on that lines,

# Authentication: 

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

Look at this picture below,














Then, remove the hash tag(#) at the "#PermitRootLogin yes" line and change the boolean "yes" to be "no". It should be like this below,
# Authentication: 

#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6

Look at this picture below,














Then, save your Configuration by pressing 'CTRL+X' then press 'y' and then enter to confirm. You may restart your sshd service by using this command below,
 service sshd restart
or
 /etc/init.d/sshd restart

Well, that's it. i hope this sort tutorial will help you to more securing your own server from any intruder might be attacking your system. See you on the next tutorial ^^

No comments:

Post a Comment