How do I disable root SSH login?

Login via SSH and edit /etc/ssh/sshd_config

Look to see if there is a line like

PermitRootLogin yes

If so change this to

PermitRootLogin no

If it does not exist then add it to the file

Save the file then restart SSH via

/etc/init.d/ssh* restart

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I tell which version of Linux I'm on?

To find out the kernel version you are on run uname -a To find out the OS you are on run...

How to change the hostname?

To change the hostname on your server If you are running C-Panel, Login to WHM and use the...

What ip's should I put in my /etc/resolv.conf?

This should be set for you already, we either use Google DNS or OpenDNS nameservers which...

How do I block an IP?

To block an IP from the command line run /sbin/iptables -I INPUT 1 -s -j DROP This will drop...

Changing the SSH port number

To change the SSH port number login as root and edit /etc/ssh/sshd_config Find the line that...