一、xinetd安装
telnet服务依赖于xinetd服务,所以需要首先安装xinetd服务
查看服务器是否安装有xinetd,如果已安装则进行下一步,没有则先安装xinetd服务
[root@localhost ~]# rpm -qa|grep xinetd
1、下载上传xinetd安装包
[root@localhost ~]# xinetd-2.3.15-14.el7.x86_64.rpm
2、安装xinetd服务
[root@localhost ~]# rpm -ivh xinetd-2.3.15-14.el7.x86_64.rpm
3、启动xinetd服务
[root@localhost ~]# systemctl start xinetd.service
[root@localhost ~]# systemctl stauts xinetd.service
● xinetd.service - Xinetd A Powerful Replacement For Inetd
Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-12-29 10:32:23 CST; 2 months 14 days ago
Main PID: 28743 (xinetd)
Tasks: 1
CGroup: /system.slice/xinetd.service
└─28743 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
二、telnet安装
1、下载上传telnet安装包
[root@localhost ~]# telnet-0.17-65.el7_8.x86_64.rpm
[root@localhost ~]# telnet-server-0.17-65.el7_8.x86_64.rpm
第一个为telnet客户端安装包,第二个为真正的telnet服务安装包
2、安装telnet服务
[root@localhost ~]# rpm -ivh telnet-0.17-65.el7_8.x86_64.rpm
[root@localhost ~]# rpm -ivh telnet-server-0.17-65.el7_8.x86_64.rpm
3、启动telnet服务
[root@localhost ~]# systemctl start telnet.socket
[root@localhost ~]# systemctl enables telnet.socket \\设置自启动
[root@localhost ~]# systemctl status telnet.socket
● telnet.socket - Telnet Server Activation Socket
Loaded: loaded (/usr/lib/systemd/system/telnet.socket; enabled; vendor preset: disabled)
Active: active (listening) since Tue 2023-03-14 16:39:56 CST; 23s ago
Docs: man:telnetd(8)
Listen: [::]:23 (Stream)
Accepted: 4; Connected: 0
三、检查防火墙
1、检查系统默认防火墙,如果未关闭系统防火墙,需关闭
[root@itkcpt ~]# systemctl status firewalld
● firewalld.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
2、配置iptables,放通telnet需要的23端口文章来源:https://www.toymoban.com/news/detail-693272.html
至此部署完成文章来源地址https://www.toymoban.com/news/detail-693272.html
到了这里,关于linux centos7部署telnet的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!