How do I Telnet as the Root User?

Posted on in Categories , , last updated November 4, 2008

Q. How do I telnet as the root user?

A. This is really a bad idea as telnet is insecure, because passwords are sent as clear text format. Instead, you should use SSH for connections. I suggest that you use SSH to connect to a system instead of Telnet for security purposes. By default, for security purposes, the root user can not telnet. However, here is method in case you need root access via telnet:

Edit /etc/pam.d/login and /etc/pam.d/remote files using a text editor such as vi. Find the line that read as follows:

auth       required     pam_securetty.so

Comment it out by prefixing # symbol:

#auth       required     pam_securetty.so

Save and close the file. Now, you should be able to telnet to your system as the root user.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

10 comment

  1. Hi,

    telnet is just fine for the home user behind a wireless router and cable modem using private IPs. Learning how to setup and use telnet is a fine first step to Linux expertise. Implementing it helps build skills on the console and confidence in the ability to configure a system. Most newbies will later go on to ssh.

    And just think it all first began with telnet…

    Cheers,

  2. for ubuntu 11.10

    auth [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die] pam_securetty.so

    commit this line
    #auth [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die] pam_securetty.so

Leave a Comment