欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Linux Centos7下安装telnet服务

程序员文章站 2024-03-21 14:15:22
...

1. 查看是否已经安装telnet

[[email protected] ~]$ rpm -qa telnet-server
[[email protected] ~]$ rpm -qa xinetd

2. 安装telnet

  1. 查找yun列表
[[email protected] ~]$ yum list |grep telnet
telnet.x86_64                               1:0.17-64.el7              base     
telnet-server.x86_64                        1:0.17-64.el7              base     
[[email protected] ~]$ yum list |grep xinetd
xinetd.x86_64                               2:2.3.15-13.el7            base 

telnet.x86_64:这个软件包提供的是 telnet 客户端程序
telnet-server.x86_64:软件包,这个才是真正的 Telnet server 软件包。
xinetd.x86_64:telnet-server服务启动依赖xinetd服务,需要首先安装,如果telnet-server服务在xinetd之前安装了,要先删除telnet-server,再安装xinetd

  1. 安装
[[email protected] ~]$ sudo yum -y install xinetd.x86_64
[[email protected] ~]$ sudo yum -y install telnet.x86_64
[[email protected] ~]$ sudo yum -y install telnet-server.x86_64
  1. 检查是否安装成功
[[email protected] ~]$ rpm -qa | grep telnet
telnet-0.17-64.el7.x86_64
telnet-server-0.17-64.el7.x86_64
[[email protected] ~]$ rpm -qa | grep xinetd
xinetd-2.3.15-13.el7.x86_64

3. 启动

[[email protected] ~]$ systemctl start telnet.socket
[[email protected] ~]$ systemctl start xinetd

4. 设置开机自启

[[email protected] ~]$ systemctl enable telnet.socket
[[email protected] ~]$ systemctl enable xinetd.service

5. 验证

[[email protected] apps]$ telnet 10.10.10.10 8080
Trying 10.10.10.10...
Connected to 10.10.10.10.
Escape character is '^]'.

完美!