


#查看版本
openssl version -a
脚本自动处理(推荐)
1、远程登录服务器下载脚本 :wget http://downinfo.myhostadmin.net/vps/openssl.sh
2、然后执行:sh openssl.sh
手工处理方法
一、安装openssl
依次执行下面命令
cd /tmp
wget -c https://www.openssl.org/source/openssl-1.0.2l.tar.gz
tar zxvf openssl-1.0.2l.tar.gz
cd openssl-1.0.2l
./config --prefix=/usr --shared
make -j4 && make install
openssl version -a
安装好了显示如下图
只能使用openssl1.0.*的版本 ,openssl1.1.0及以上不兼容 ,可查看openssh安装说明

使用openssl1.1.*版本编译openssh时会出现下面的错误
二、升级openssh
依次执行下面命令
yum install -y pam-devel
cd /usr/local/src
wget -c https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-7.5p1.tar.gz
tar zxvf openssh-7.5p1.tar.gz
cd openssh-7.5p1
./configure --sbindir=/usr/sbin/ --bindir=/usr/bin/ --sysconfdir=/etc/ssh --with-ssl-engine --with-pam
make -j4 && make install
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
service sshd restart
显示如下图就是编译拷贝好了
sshd -h #查看版本
注意:安装完成后不要马上断开连接
先测试多测试几下是否能够新建连接
如果能:安装完成,可以退出连接



文章评论 本文章有个评论