Linux入门:配置telnet服务并证明为xinetd服务

Linux大全评论1.3K views阅读模式

通过yum查看发现已经安装telnet-server包:
[root@localhost ~]# yum list | grep telnet\*
Repository rhel-debuginfo is listed more than once in the configuration
This system is not registered with RHN.
RHN support will be disabled.
telnet.i386                              1:0.17-39.el5          installed     
telnet-server.i386                      1:0.17-39.el5          base 

但是不能通过service 命令启动该服务-----此处表明telnet不是standrand along的服务,而是xinetd的服务

通过查看/etc/xinetd.d/目录发现没有telnet的服务,于是考虑是不是因为没有安装xinetd的包导致的,

[root@localhost ~]# ls /etc/xinetd.d/
eklogin  ekrb5-telnet  gssftp  klogin  krb5-telnet  kshell  rsync
接下来安装telnet-server发现会自动安装xinetd的包--再次证明为xinetd的服务
[root@localhost ~]# yum -y install telnet-server
Loading "security" plugin
Loading "rhnplugin" plugin
Repository rhel-debuginfo is listed more than once in the configuration
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package telnet-server.i386 1:0.17-39.el5 set to be updated
--> Processing Dependency: xinetd for package: telnet-server
--> Running transaction check
---> Package xinetd.i386 2:2.3.14-10.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                Arch      Version          Repository        Size
=============================================================================
Installing:
 telnet-server          i386      1:0.17-39.el5    server            35 k
Installing for dependencies:
 xinetd                  i386      2:2.3.14-10.el5  server            124 k

Transaction Summary
=============================================================================
Install      2 Package(s)       
Update      0 Package(s)       
Remove      0 Package(s)       

Total download size: 159 k
Downloading Packages:
(1/2): xinetd-2.3.14-10.e 100% |=========================| 124 kB    00:00   
(2/2): telnet-server-0.17 100% |=========================|  35 kB    00:00   
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: xinetd                      ######################### [1/2]
  Installing: telnet-server                ######################### [2/2]

Installed: telnet-server.i386 1:0.17-39.el5
Dependency Installed: xinetd.i386 2:2.3.14-10.el5
Complete!

启动xinetd服务:

[root@localhost ~]# service xinetd status
xinetd is stopped
[root@localhost ~]# service xinetd start
Starting xinetd: [  OK  ]
[root@localhost ~]# service xinetd status
xinetd (pid 7044) is running...

测试发现仍然不能telnet:
[root@localhost ~]# telnet localhost
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host: Connection refused
[root@localhost ~]# netstat -tanp | grep 23

没有输出表明telnet没有起来,接着trubshooting(排错)
[[root@localhost ~]# grep disable /etc/xinetd.d/telnet
        disable        = yes
[root@localhost ~]# chkconfig telnet on
[[root@localhost ~]# netstat -tanp | grep :23
[root@localhost ~]# chkconfig telnet on

企鹅博客
  • 本文由 发表于 2019年9月10日 09:14:03
  • 转载请务必保留本文链接:https://www.qieseo.com/204750.html

发表评论