Log in as root from other than /dev/console

Edit /etc/default/login with your editor (probably vi). Navigate to the line which reads

# If CONSOLE is set, root can only login on that device.
# Comment this line out to allow remote login by root.

and comment it out.

Of course, don’t forget to change /etc/ssh/sshd_config:

# Are root logins permitted using sshd.
# Note that sshd uses pam_authenticate(3PAM) so the root (or any other) user
# maybe denied access by a PAM module regardless of this setting.
# Valid options are yes, without-password, no.
PermitRootLogin yes

Comments are closed.