Tuesday, 28 January 2014


Many occasion we are in position to enable the telnet services instead of SSH even though its not recommended by RedHat as password might be spread when we using Telnet services. 




First we have to check whether telnet RPM are installed; if not we need to install the telnet RPM as follows
[root@unixrock /]# uname -a
Linux unixrock 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@unixrock /]# rpm -qa | grep telnet
[root@unixrock /]#
Installing telnet RPM through YUM
[root@unixrock /]# yum install telnet-server telnet
Setting up Install Process
Package 1:telnet-0.17-47.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package telnet-server.x86_64 1:0.17-47.el6 will be installed
--> Processing Dependency: xinetd for package: 1:telnet-server-0.17-47.el6.x86_64
--> Running transaction check
---> Package xinetd.x86_64 2:2.3.14-34.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================
 Package                                 Arch                             Version                                   Repository                          Size
=================================================================================
Installing:
 telnet-server                           x86_64                           1:0.17-47.el6                             unixrock                            37 k
Installing for dependencies:
 xinetd                                  x86_64                           2:2.3.14-34.el6                           unixrock                           121 k

Transaction Summary
=================================================================================
Install       2 Package(s)

Total download size: 157 k
Installed size: 312 k
Is this ok [y/N]: y
Downloading Packages:
---------------------------------------------------------------------------------
Total                                                                                                                        1.3 MB/s | 157 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 2:xinetd-2.3.14-34.el6.x86_64                                                                                                             1/2
  Installing : 1:telnet-server-0.17-47.el6.x86_64                                                                                                        2/2
warning: /etc/xinetd.d/telnet created as /etc/xinetd.d/telnet.rpmnew
  Verifying  : 1:telnet-server-0.17-47.el6.x86_64                                                                                                        1/2
  Verifying  : 2:xinetd-2.3.14-34.el6.x86_64                                                                                                             2/2

Installed:
  telnet-server.x86_64 1:0.17-47.el6

Dependency Installed:
  xinetd.x86_64 2:2.3.14-34.el6

Complete!
[root@unixrock /]#
After telnet RPM installed, we have to make it sure the value set as "disable = no" on /etc/xinetd.d/telnet
[root@unixrock /]# more /etc/xinetd.d/telnet
# default: on
# description: the telnet server servers telnet session; it uses \
#     unencrypted username/password pairs for authentication.
service telnet
{
        flag            = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = no
}
[root@unixrock /]#
Now we can turn on the telnet server service with using chkconfig command as mentioned below, this will make the services ON across the reboot.
[root@unixrock /]# chkconfig telnet on
[root@unixrock /]# chkconfig xinetd on
[root@unixrock /]# service xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
[root@unixrock /]#
xinetd daemon is the part of telnet services, for immediate access service needs to be restarted.
[root@unixrock /]# telnet 192.168.10.20
Trying 192.168.10.20...
Connected to 192.168.10.20.
Escape character is '^]'.
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Kernel 2.6.32-279.el6.x86_64 on an x86_64
login:
telnet> quit
Connection closed.
[root@unixrock /]#
Cool !!! Now you should able to see the telnet services. Thanks for reading this post, if you have any doubt, please leave your valuable comments, I will respond to you at earliest possible.