Disable Root login over SSH

Last modified: 
Friday, July 3rd, 2015
Topics: 
SSHsysadmin

These instructions are based on Debian.

Open file as root or sudo

vim /etc/ssh/sshd_config

Add or Edit the Following Lines

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no
UsePAM no

Save your work.

Restart SSHD

 service sshd reload

Or on some systems

/etc/init.d/sshd reload


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.