Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Networking > Issue <<  1 of 351 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 453
Last update: 12-22-06
Issue:
How do I telnet as the root user?
Resolution:

Red Hat recommends that you use SSH to connect to a system instead of Telnet for security purposes. Passwords are transmitted in plain text when you use telnet. For this reason, the root user is not allowed to connect using telnet by default.

This article assumes that you have the telnet-server package properly installed and listening on port 23.

By default, for security purposes, the root user can not telnet to a Red Hat system. One way to change this it to modify your /etc/pam.d/login and /etc/pam.d/remote files. A default file looks similar to this:

#%PAM-1.0
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

In this file, the first line:

auth       required     pam_securetty.so

is what controls the root login for telnet, as well as other services. Understand what you are doing before making this change. If you do not understand what this will do to your system, then do not proceed.

In order to allow root login with telnet, comment out the first auth line so that your /etc/pam.d/login looks like this:

#%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

Once you save these changes, you should be able to telnet to your system as the root user:

[root@jaws root]# telnet 10.0.0.15
Trying 10.0.0.15...
Connected to 10.0.0.15.
Escape character is '^]'.
Red Hat Enterprise Linux AS release 3 (Taroon Update 5)
Kernel 2.4.21-32.0.1.ELsmp on an i686
login: root
Password:
Last login: Sat Oct 22 11:58:56 from 10.0.0.25

Note: Make sure that the telnet service is enabled. To enable telnet:

chkconfig --level 345 telnet on


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Networking > Issue <<   1  of  351  >>