LINUX

This tutorial explains how to configure Telnet Sever in Redhat Linux 6 including how to enable login for root user account in telnet service.

Telnet protocol allows you to connect to remote hosts over TCP/IP network.

Telnet was developed in 1969. Telnet was initially developed for private use where security was not primary concern. Telnet protocol has serious security issue. Security expert recommend that the use of Telnet for remote login should be discontinued under all normal circumstances.

Version Note

This tutorial is prepared for Centos/RHEL 6.0 ( or lower version). To learn how to configure Telnet Server in RedHat 7.0 (or higher version) please see this tutorial.

Configure Telnet Server in RHEL/Centos
  • Telnet Server
  • Telnet Client

Telnet Sever

Telnet server software is installed on remote host. You need to configure it before client can connect with it.

Telnet Client

Telnet client software allows you to connect telnet server. Once telnet client establishes a connection to the remote host, client becomes a virtual terminal, allowing you to communicate with the remote host from your computer.

Security issue with Telnet

  • Telnet by default does not encrypt any data sent over the connection.
  • Anyone who has access to network device located on the network between the two hosts like router, switch, hub or gateway where Telnet is being used can intercept the packets passing by and obtain login, password and whatever else is typed with a packet sniffer software.
  • Telnet protocol have no implementations that would ensure that communication is carried out between the two hosts is not intercepted in the middle.
  • In RHEL Telnet is part of the xinetd daemon.
  • Telnet use plain text to transmit password.
  • root user is not allowed to connect using Telnet.
  • Command-line telnet clients are built into all major operating systems.
  • RedHat recommends you to use SSH to connect a system instead of Telnet.
  • Use Telnet in LAB environment where security is not concern.

Configure Telnet in RHEL

Three RPM are required to configure telnet server in linux.

  • xinetd
  • telnet-server
  • telnet-clinet

Login from root user and check required RPM. If you do not have the telnet-server or telnet packages installed, you can install them with the RPMs available from your installation media. The version numbers of the package should not matter, Red Hat Network (RHN) will always provide you with the latest version of the package.

server-rpm

Once you have the packages installed, check the /etc/xinetd.d/telnet file

server-etc-xinetd-telnet

ensure that disable = yes is changed to read disable = no.

server-telnet-file

Turn the Telnet server on using the chkconfig command.

server-chkconfig-telnet

Also check xinetd service

server-chkconfig-xinetd

You will need to restart the xinetd service.

server-xinetd-restart

As I said above root user is not allowed to login from telnet. We need to create a normal user account.

server-useradd

To connect with telnet server we need specify server IP address which you can check with ifconfig command. You should test telnet configuration before connecting from client computer.

server-testing-on-server

To terminate telnet session logout from logged in user.

server-testing-exit

Configure telnet client in RHEL

On client system we need telnet and xinetd package.

linuxclient-check-rpm

check telnet service status on it if it is set to off

linuxclient-chkconfig-telnet

open configuration file of telnet

linuxclient-etc-xinetd-telnet

check telnet service is enabled make sure that disable = yes is changed to disable = no

linuxclient-telnet-config-file

restart the xinetd service

linuxclient-xinetd-restart

Check connectivity with server

linuxclient-ping

We are getting reply of ping from server so we have connectivity with server .connect with telnet server

linuxclient-telnet-unable-to-reach-host

Error

telnet:connect to address 192.168.1.1:No route to host

Telnet client is unable to connect with telnet server because firewall on server is blocking telnet connection. To solve this error Go on server

Run setup command

server-setup

select Firewall configuration

server-setup-firewall

Firewall is enabled by default

server-firewall-enabled

To disable the firewall unselect the enable

server-firewall-unchked

Ignore the warning and select OK and press enter

server-firewall-warning-ok

Select Quit and press enter to save the configuration

server-firewall-quit-to-save

restart the xinetd service

server-xinetd-restart

Now come back to client system and try to connect with telnet sever

linuxclient-telnet-sucess

This time we have successfully connected with Telnet server. To terminate telnet session logout from testuser.We have successfully configured Telnet client on RHEL 6.

How configure Telnet client on Window 7

Open command prompt and run telnet command

windowclient-telnet

Error

 'telnet' is not recognized as an internal or external command, operable program or batch file.

windowclient-unrecognized-telnet

You will get error because Window 7 does not turn on telnet client service automatic. We need to start it manually.

Open control panel and click on program.

windowclient-control-pannel-program

click on turn windows features on or off

windowclient-program-window

Scroll down and check mark on Telnet client and click on OK

windowclient-checked-telnet

Now you can run telnet command. Login form normal user

windowclient-logged-in-normal-user

logout from normal user and try to login from root

windowclient-exit-from-normal-user

By default root user is not allowed to login through the terminal session

windowclient-root-fail

To allow root user Go on server system and open /etc/securetty file

server-etc-securetty

In the end of file add pts/0 and save the file

server-pts

Go back on windows system and try again to login from root user

windowclient-root-sucess