Linux, Networking, Server

Telnet Server Configuration (RedHat/CentOS):

In this scenario:

IP Address of Telent Server =
1. First install the required package (telnet-server):

yum install telnet-server
2. Edit telnet configuration file (telnet) located in /etc/xinetd.d:

vim /etc/xinetd.d/telnet

service telnet
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure  += USERID
disable = no
Note: In above configuration file just replace disable = yes with disable = no

3. Start the required service.

service xinetd start

4. Set xinetd to automatically start at boot time.

chkconfig xinetd on

Note: By default root login for telnet connection is disable. To enable it take following steps:

1. Edit /etc/securetty file to add pts/0 to enable one telnet session for root. if you need to open more telnet session for root and add more pts/1 pts/2 and so on.

vim /etc/securetty

#add following at the end of file#

2. Restart xinetd service.

service xinetd restart

Connecting Telnet Server from the other computer in a network:

1. If you want to connect Telnet Server from Linux Computer you, run following command in Linux Terminal.

telnet <ip address of telnet server>


[root@wpc ~] # telnet
Connected to (
Escape character is ‘^]’.
CentOS release 5.4 (Final)
Kernel 2.6.18-164.el5 on an i686
login: user1
[user1@wpc ~]$


Type any username and it’s password other than root when login is prompted, and if you want to work as a root simply use su – command to switch to the root user.

2. If you want to connect Telnet Server from Windows Computer, run the same command at Command Prompt.


Configure telnet server on custom port number:

First configure your Telnet Server as above, then
edit /etc/services and replace the standard port 23 with your custom port number (for example: 1024)

telnet          1024/tcp                          # Telnet

telnet          1024/udp