telnet服务

本文介绍如何利用telnet服务进行远程连接操作,包括-L选项用于列出远程主机的端口和服务,-n选项用于以数字形式显示主机名和端口号。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

# 安装服务
rpm -qa | grep xinetd    「 xinetd轻量级服务管理」 
yum install -y telnet
yum install -y telnet-server
 
# 开机自启
systemctl list-unit-files | grep telnet    「 系统服务 」 
telnet@.service                               static
telnet.socket                                 enabled

 

systemctl enable telnet.socket
systemctl start telnet.socket
systemctl status telnet.socket
chkconfig telnet.socket on    「 centos7 不再支持chkconfig」 
error reading information on service telnet.socket: No such file or directory

 

which telnet
/usr/bin/telnet

 

# 开放端口
iptables -I INPUT -p tcp --dport 23 -jACCEPT
iptables -I INPUT -p udp --dport 23 -jACCEPT
iptables -L -n
  • -L --list
  • -n --numeric
service iptables save    「 iptables-save > /etc/sysconfig/iptables 」 
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

 

service iptables restart
 
# 端口可用
telnet {IP} {port}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值