Linux Pathfinder: Linux Howtos and Tutorials

Install and configure Telnet Server in Linux

Install and configure Telnet Server in Linux
Install and configure Telnet Server in Linux

Telnet service is to provide a text-oriented communications and this service is used on internet/LAN using a virtual terminal connection. Telnet by default uses 23 port number. We will use telnet server installation and configurations on CentOS 6 / Red Hat family as this service is also applicable and works to fedora distribution environment.

IP Configuration ( My Server IP address is )

Telnet Server Configuration

Open Terminal and login as root user.

Install Telnet server using yum.

[root@linuxpathfinder /]# yum install telnet telnet-server

Setting up Install Process
 Resolving Dependencies
 --> Running transaction check
 ---> Package telnet.i686 1:0.17-47.el6_3.1 will be installed
 ---> Package telnet-server.i686 1:0.17-47.el6_3.1 will be installed
 --> Processing Dependency: xinetd for package: 1:telnet-server-0.17-47.el6_3.1.i686
 --> Running transaction check
 ---> Package xinetd.i686 2:2.3.14-39.el6_4 will be installed
 --> Finished Dependency Resolution

Dependencies Resolved
 Package               Arch     Version           Repository Size
 telnet               i686     1:0.17-47.el6_3.1  base       57 k
 telnet-server        i686     1:0.17-47.el6_3.1  base       36 k
 Installing for dependencies:
 xinetd               i686     2:2.3.14-39.el6_4  updates    122 k

Transaction Summary
 Install       3 Package(s)

Total download size: 215 k
 Installed size: 413 k
 Is this ok [y/N]:

Press [y] to complete the installation.

 telnet.i686 1:0.17-47.el6_3.1
 telnet-server.i686 1:0.17-47.el6_3.1

Dependency Installed:
 xinetd.i686 2:2.3.14-39.el6_4


Need to configure telnet server, go to the directory /etc/xinetd.d to change configuration.

[root@linuxpathfinder /]# cd /etc/xinetd.d

Using vim editor to edit the telnet file.

[root@linuxpathfinder xinetd.d]# ls

chargen-dgram   daytime-dgram   discard-dgram   echo-dgram   tcpmux-server  time-dgram
 chargen-stream  daytime-stream  discard-stream  echo-stream  telnet   time-stream

Change option ‘disable = yes’ to ‘disable = no’.

 # default: on
 # description: The telnet server serves telnet sessions; it uses \
 #       unencrypted username/password pairs for authentication.
 service telnet
 flags           = REUSE
 socket_type     = stream
 wait            = no
 user            = root
 server          = /usr/sbin/in.telnetd
 log_on_failure  += USERID
 disable         = no

Restart the service after change in the file and permanently save the changes by using chkconfig option.

[root@linuxpathfinder xinetd.d]# service xinetd restart

Stopping xinetd:              [  OK  ]
Starting xinetd:              [  OK  ]

[root@linuxpathfinder xinetd.d]# chkconfig xinetd on

Check out the firewall settings for further configuration:

[root@linuxpathfinder /]# setup


Enable the firewall settings and add telnet port 23 and Protocol is tcp

Again restart the xinetd service after firewall settings.

[root@linuxpathfinder /]# service xinetd restart

Telnet Client Configuration

On the client end, you have to know the IP address of the remote server to access via telnet remotely. Remote communication with Telnet is insecure between server and client. For the secure communication use ssh service as explained already in previous tutorials.

Open Terminal and use the command telnet <server ip address>

Now put the username and password to access the remote system. (Login name : asifark)

Note : You cannot directly login as a super user in telnet.

[root@linux-server ~]# telnet

 Connected to
 Escape character is '^]'.
 CentOS release 6.4 (Final)
 Kernel 2.6.32-358.18.1.el6.i686 on an i686
 login: asifark
 Last login: Wed Sep 30 14:44:14 from
 [asifark@linuxpathfinder ~]$ ls
 [asifark@linuxpathfinder ~]$ logout
 Connection closed by foreign host.
 [root@linux-server ~]#

Share this article:

Asif Khan's picture
I am an experienced Linux System and Network Administrator with having more than 9 years of experience. My primary responsibilities are to keep up and running Linux system environment, backups important data with scripting and configuration management on AWS Linux server environments. My aim is to help people, in finding their path towards a solution to their problems. Well, I believe helping others can good for both parties, to them and to you as well. That day and today is the day that thousands of people seek help from my website to help people find answers to their questions. I am sure that everyone will get all the answers to their questions related to software and operating system, and this website will help you keep your system updated.

Add new comment


Enter the characters shown in the image.