测试中标麒麟7.6 中标麒麟6.5 centos6.10 centos7.6
1、配置telnet
为防止openssh升级失败。所以安装telnet。保证openssh升级失败也可以通过telnet连接服务器,进行恢复操作。并不用去机房
yum install -y telnet-server xinetd
systemctl start telnet.socket #启动telnet.socket
systemctl start xinetd #启动xinetd
systemctl enable telnet.socket #设置开机自启
systemctl enable xinetd #设置开机自启
默认情况下,系统是不允许root用户telnet远程登录的。如果要使用root用户直接登录,需设置如下内容。或者可以添加一个可以登录的用户,登录并su到root用户
echo 'pts/0' >>/etc/securetty
echo 'pts/1' >>/etc/securetty
echo 'pts/2' >>/etc/securetty
echo 'pts/3' >>/etc/securetty
systemctl restart telnet.socket
systemctl stop firewalld #关闭防火墙
systemctl disable firewalld #关闭随机自启防火墙,安装完成之后开启
###centos6的系统需要修改/etc/xinet.d/telnet文件
把disable = yes改成no
重启xinetd就可以telnet
service xinetd restart
最后执行telnet ip进行登录即可
标签:openssh,telnet,升级,etc,systemctl,xinetd,securetty,pts From: https://blog.csdn.net/zt1992226/article/details/143626534