Monday, 16 December 2013

Linux - Disable Root SSH Access

Disable Root SSH Access

I needed to disable root ssh access without disabling root user or su - root.

in order to do this, it really is easy.

edit /etc/ssh/sshd_config

To do this you can use vi:
vi /etc/ssh/sshd_config

find the line that says:
#PermitRootLogin yes

change that line to
PermitRootLogin no

save and restart sshd
you can do that by:
/etc/init.d/sshd restart

now root cannot be logged in through ssh anymore.

#bearMan