Enable root logins using ssh in Debian 8.0

By default you can no longer login using ssh as root with just a password since it is more secure to use a pre-shared key. However, you can you can still enable root logins using password authentication.

To do this you need to edit the ssh config file ‘/etc/ssh/sshd_config/sshd_config’ as root.

# vi /etc/ssh/sshd_config

Then find the entry in the Authentication section of the file that says ‘PermitRootLogin’ and change ‘without-password’ to ‘yes’.

# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes

Note – It is just a personal preference but when making this sort of change I prefer to comment out the original entry and create a new one.

You will need to restart the SSH server (or reboot) for this change to take effect.

# service sshd restart
Share

Leave a Reply