剑道第一仙

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

CentOS7安装Telnet服务

CentOS7安装Telnet服务


1.在安装Telnet前先检查系统是否安装了telnet-server和xinetd
rpm -qa telnet-server
rpm -qa xinetd

2.如果没有安装,则开始安装
yum -y install telnet-server
yum -y install telnet
yum -y install xinetd


3.配置并启动Telnet,xinetd和telnet必须设置开机启动
systemctl enable xinetd.service
systemctl enable telnet.socket

4.接下来启动服务
systemctl start telnet.socket
systemctl start xinetd

5.配置防火墙规则,或者关闭防火墙
firewall-cmd --permanent --add-port=23/tcp
firewall-cmd --reload

systemctl restart iptables
systemctl disable firewalld
systemctl stop firewalld

6.默认root无法远程访问,因此需要修改以下配置文件/etc/securetty
而且centos7下面安装telnet没有生成 /etc/xinetd.d/telnet文件
vi /etc/securetty
在末尾添加
pst/0
pst/1

保存退出,使用Windows下cmd或者putty等工具测试telnet

7.查看日志
tail -f /var/log/secure


本文来自博客园,作者:花之旭,转载请注明原文链接:https://www.cnblogs.com/huazhixu/p/15784811.html

posted on   剑道第一仙  阅读(345)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
点击右上角即可分享
微信分享提示