How to Install and Enable Telnet Service on CentOS

1. Check if the Telnet Service is Installed

rpm –qa|grep telnet

If not installed, locate the installation package to install it. If you have an installation CD, find the corresponding package on it. Here we install directly via the network.

2. Install the Telnet Program via yum install

[root@bogon xinetd.d]# yum list telnet-server

Loading "installonlyn" plugin

Setting up repositories

Reading repository metadata in from local files

Available Packages

telnet-server.i386 1:0.17-39.el5 base

[root@bogon xinetd.d]# yum install telnet-server

Loading "installonlyn" plugin

Setting up Install Process

Setting up repositories

Reading repository metadata in from local files

Parsing package install arguments

Resolving Dependencies

–> Populating transaction set with selected packages. Please wait.

—> Downloading header for telnet-server to pack into transaction set.

telnet-server-0.17-39.el5 100% |=========================| 8.4 kB 00:01

—> Package telnet-server.i386 1:0.17-39.el5 set to be updated

–> Running transaction check

 

Dependencies Resolved

 

=============================================================================

Package Arch Version Repository Size

=============================================================================

Installing:

telnet-server i386 1:0.17-39.el5 base 35 k

 

Transaction Summary

=============================================================================

Install 1 Package(s)

Update 0 Package(s)

Remove 0 Package(s)

 

Total download size: 35 k

Is this ok [y/N]: y Select Yes

Downloading Packages:

(1/1): telnet-server-0.17 100% |=========================| 24 kB 00:31

http://ftp.stu.edu.tw/Linux/CentOS/5.2/os/i386/CentOS/telnet-server-0.17-39.el5.i386.rpm: [Errno 4] Socket Error: timed out

Trying other mirror.

http://centos.cs.nctu.edu.tw/5.2/os/i386/CentOS/telnet-server-0.17-39.el5.i386.rpm: [Errno 4] IOError: <urlopen error (104, 'Connection reset by peer')>

Trying other mirror.

(1/1): telnet-server-0.17 100% |=========================| 35 kB 00:00

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

Installing: telnet-server ######################### [1/1]

 

Installed: telnet-server.i386 1:0.17-39.el5

Complete!

 

3. Modify the Configuration File: more /etc/xinetd.d/telnet

 

[root@bogon xinetd.d]# more telnet

# 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 = yes

}

Change the disable entry from yes to no.

4. Restart the Service to Apply Changes

/etc/init.d/xinetd restart

Leave a Comment

Your email address will not be published.