1、查看有没有安装telnet服务

rpm –qa|grep telnet

2、通过yum install安装Telnet程序

yum list telnet-server
yum install telnet-server


3. 修改配置文件/etc/xinetd.d/telnet

将disable项由yes改成no。

4、重启服务生效

service xinetd restart

5.iptable加入例外

iptables -A INPUT -i eth1 -p tcp --dport 23 -j ACCEPT

6.重启iptables

service iptables restart
iptables-save

7.增加一个ssh的端口18439

# 编辑 /etc/ssh/ssh_config
vi /etc/ssh/ssh_config
# 在 Host * 下 ,加入新的 Port 值。以 18439 为例(下同):
Port 22
Port 18439

# 编辑 /etc/ssh/sshd_config
vi /etc/ssh/sshd_config
#加入新的 Port 值
Port 22
Port 18439


8. 保存后,重启 SSH 服务:
service sshd restart

9.关闭ssh 22
iptables -A INPUT -i eth1 -p tcp --dport 22 -j DROP

iptables-save

相关文章:

  • 2021-10-16
  • 2021-08-05
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2022-01-15
  • 2021-12-16
  • 2022-12-23
猜你喜欢
  • 2021-05-25
  • 2022-01-02
  • 2021-09-15
  • 2021-10-27
  • 2022-01-20
  • 2022-12-23
相关资源
相似解决方案