脚本自动处理(推荐)
1. 远程登入服务器下载脚本 wget http://downinfo.myhostadmin.net/vps/openssl.sh
2. 然后执行sh openssl.sh
手工处理方法
一、安装openssl依次执行下面命令cd/tmpwget-chttps://www.openssl.org/source/openssl-1.0.2l.tar.gztarzxvfopenssl-1.0.2l.tar.gzcdopenssl-1.0.2l./config--prefix=/usr--sharedmake-j4&&makeinstallopensslversion-a安装好了显示如下图只能使用openssl1.0.*的版本 ,openssl1.1.0及以上不兼容 ,可查看openssh安装说明使用openssl1.1.*版本编译openssh时会出现下面的错误二、升级openssh依次执行下面命令yuminstall-ypam-develcd/usr/local/srcwget-chttps://openbsd.hk/pub/openbsd/openssh/portable/openssh-7.5p1.tar.gztarzxvfopenssh-7.5p1.tar.gzcdopenssh-7.5p1./configure--sbindir=/usr/sbin/--bindir=/usr/bin/--sysconfdir=/etc/ssh--with-ssl-engine--with-pammake-j4&&makeinstallecho'permitrootloginyes'>>/etc/ssh/sshd,configservicesshdrestart显示如下图就是编译拷贝好了sshd -h #查看版本
注意安装完成后不要马上断开连接先测试多测试几下是否能够新建连接如果能安装完成,可以退出连接