官网下载最新安装包上传至服务器
http://www.openssh.com/releasenotes.html
安装telnet (以防升级失败连不上服务器)
# 查看是否安装telnet服务
rpm -qa | grep telnet
rpm -qa | grep xinetd
# 若无安装,yum安装
yum -y install telnet*
yum -y install xinetd
#将服务开机自启(此处根据自身情况考虑)
systemctl enable xinetd.service
systemctl enable telnet.socket
#开启服务
systemctl start telnet.socket
systemctl start xinetd
vi /etc/securetty
在最后添加两行
echo 'pts/0' >>/etc/securetty
echo 'pts/1' >>/etc/securetty
echo 'pts/2' >>/etc/securetty
systemctl restart xinetd
netstat -plnt |grep 23 # 确认下是否启动成功