ITPub博客

首页 > Linux操作系统 > Linux操作系统 > telnet could not open connection to the host on port 23

telnet could not open connection to the host on port 23

原创 Linux操作系统 作者:AiKou_zhang 时间:2011-07-02 17:39:50 0 删除 编辑

How To Install And Start Telnet Server In Red Hat Linux?

Every server administrators should and must know that telnet protocol is not secure, because data packets transfer between telnet server and client not encrypted.

That’s to say, anyone who use sniffer to capture network packets can read the plain text transfer over the network. If the packets captured contain login credentials, the server access and security control will be compromised.

Thus, by default, most Linux distributions install SSH server and not telnet. Red Hat Linux even explicitly categorize telnet server as one of the “legacy network servers”.

However, what if you really want the Linux machine running such insecure protocol?

How to install and start the insecure telnet server (in Red Hat Linux Enterprise 4)?

  1. Look for the telnet-server RPM file in the installation CD/DVD and install it from command line, e.g. rpm -Uvh telnet-server-0.17-31.EL4.3.
    Alternatively, login to GNOME Desktop, go to Application menu, System Settings, and click Add/Remove Applications to bring up Package Management window:

     
    How to install and start telnet server in Red Hat Linux?

    Select Legacy Network Server (tick the check box), click Details link to bring up Legacy Network Server Package Details window, and select Telnet-Server to proceed with the installation.
     
  2. At Linux command prompt, execute chkconfig telnet on to allow the xinetd spawns telnet-server processes upon client requests.
    Alternatively, edit the telnet configuration file (/etc/xinetd.d/telnet) and change disable = yes to disable = no.
     
  3. Make sure the xinetd is running on your Linux default runlevel. To be sure, configure xinetd to start at runlevel 3, 4, and 5:
    chkconfig --level 345 xinetd on
    

    If xinetd is not currently running (run ps -elf | grep xinetd), execute service xinetd start or service xinetd restart to start/restart it.


The running xinetd (extend Internet service daemon) listens to telnet client request on port 23 and spawn the telnet-server (/usr/sbin/in.telnetd) upon request, shut it down when telnet client drop the connection.

To confirm xinetd is listening to port 23, execute the netstat utility:

netstat -tulpan | grep 23
service xinetd start or service xinetd restart
[root@redhat ~]# netstat -tulpan |grep 23
tcp        0      0 0.0.0.0:23                  0.0.0.0:*                   LISTEN      5282/xinetd        
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      2239/cupsd         
tcp        0      0 192.168.1.151:23            192.168.1.167:4677          TIME_WAIT   -                  
tcp        0      0 192.168.1.151:23            192.168.1.167:4680          ESTABLISHED 5286/in.telnetd: 19
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               2239/cupsd

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24766946/viewspace-701206/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-02-11

  • 博文量
    16
  • 访问量
    32837