centos6 离线升级openssh防止断开
telnet-server、xinetd根据当前系统版本查找下载:https://vault.centos.org
如centos6.5 64位系统:https://vault.centos.org/6.5/os/x86_64/Packages
1.安装telnet-server-*.rpm
rpm -ivh telnet-server-0.17-47.el6_3.1.x86_64.rpm
2.安装xinetd-*.rpm
rpm -ivh xinetd-2.3.14-39.el6_4.x86_64.rpm
3.检查services配置
telnet 23/tcp
telnet 23/udp
3.将telnet在xinetd的配置中启用
vi /etc/xinetd.d/telnet
disable = no # 启用telnet
重启:service xinetd restart
4.编辑iptables文件,放行23断开
vi /etc/sysconfig/iptables
添加-A INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT
重启防火墙service iptables restart
5.编辑securetty增加内容
vi /etc/securetty
最后行追加
pts/0
pts/1
pts/2
pts/3
如本博客教程对你有所帮助,请点赞支持一下~