SecuritySSH/Telnet

Telnet as the root user

Linux generally leaves the telnet service disabled for security reasons. But if you want to use telnet without logging in multiple times, what can you do? This article explains how to allow remote telnet access as root in a few simple steps.

Edit /etc/pam.d/login and comment out the line with # as shown below.

#%PAM-1.0
#Commented out below line in order to allow root access for telnet
#auth required pam_securetty.so
auth required pam_stack.so service=system-auth
auth required pam_nologin.so
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
session optional pam_console.so

Then test remote access with telnet.

EOF.← Back to articles