telnet could not open connection to the host on port 23

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
 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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/24766946/viewspace-701206/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
"Could not connect to '' (port 22): Connection failed." 这个错误通常是由于无法建立与服务器的SSH连接造成的。这可能是由于几种原因,例如服务器IP地址或端口号错误、网络连接问题、服务器防火墙配置等。首先,您需要确保您输入的IP地址和端口号是正确的,并且您的网络连接是正常的。如果问题仍然存在,您可以尝试以下解决方法: 1. 检查服务器IP地址和端口号:确保您输入的IP地址和端口号与服务器设置一致。您可以联系服务器管理员确认这些信息。 2. 检查网络连接:确保您的计算机与服务器之间的网络连接是正常的。您可以尝试通过ping命令检查网络连接是否正常,例如在命令提示符或终端窗口中运行ping命令,如:ping 192.168.234.128。 3. 检查服务器防火墙配置:如果您的服务器启用了防火墙,可能会阻止SSH连接。您可以联系服务器管理员确认服务器防火墙的配置,并确保允许通过SSH连接。 4. 检查SSH服务是否正在运行:确保您的服务器上已经运行了SSH服务。您可以通过使用telnet命令测试SSH端口是否打开,例如在命令提示符或终端窗口中运行telnet命令,如:telnet 192.168.234.128 22。 5. 检查防病毒软件或防火墙:有时,您的计算机上的防病毒软件或防火墙可能会阻止SSH连接。您可以暂时禁用它们并尝试重新连接。 如果您仍然无法解决连接问题,请进一步排查网络配置、服务器设置和安全配置等方面的问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值