Linux, Networking, Server

Telnet Server Configuration (RedHat/CentOS):

In this scenario:

IP Address of Telent Server = 192.168.1.111
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#
pts/0
pts/1
pts/2

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>

telnet 192.168.1.111

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


Note:

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.
telnet 192.168.1.111

 

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

Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s