【漏洞公告】CVE-2016-10009:OpenSSH远程代码执行漏洞
#---- 1. 升级 zlib ----#
wget wget http://zlib.net/zlib-1.2.11.tar.gz
tar zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make
make install
ll /usr/local/lib # 查看版本
#---- 升级openssl-flips ----#
wget https://www.openssl.org/source/openssl-fips-2.0.14.tar.gz
tar zxvf openssl-fips-2.0.14.tar.gz
cd openssl-fips-2.0.14
./config
make
make install
#------- 升级openssl ---------#
wget https://www.openssl.org/source/openssl-1.0.2i.tar.gz
tar zxvf openssl-1.0.2i.tar.gz
cd openssl-1.0.2i
./config
make
make install
ln -s /usr/local/lib64/libssl.so.1.0 /usr/lib64/libssl.so.1.0
ln -s /usr/local/lib64/libcrypto.so.1.0 /usr/lib64/libcrypto.so.1.0
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
yum install pam* -y
#-------- 安装 openssh ---------#
wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.4p1.tar.gz
tar zxvf openssh-7.4p1.tar.gz
cd openssh-7.4p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-pam --with-privsep-path=/var/lib/sshd --with-ssl-dir=/usr/local/lib64 --without-hardening
make
make install
# 备份sshd文件,重命名为sshd_20170209_old
mv /etc/init.d/sshd /etc/init.d/sshd_20170209_old
# 复制配置文件、赋权、添加到开机启动项
cd /root/openssh-7.4p1/contrib/redhat
cp sshd.init /etc/init.d/sshd
cp ssh_config /etc/ssh/ssh_config
# 根据提示,输入y进行覆盖(若对原文件重命名,则无需覆盖)
cp -p sshd_config /etc/ssh/sshd_config
# 根据提示,输入y进行覆盖(若对原文件重命名,则无需覆盖)
chmod u+x /etc/init.d/sshd
chkconfig --add sshd
chkconfig sshd on
# 重启sshd服务
service sshd restart
#------ 查看版本 ------#
ssh -V
OpenSSH_7.4p1, OpenSSL 1.0.2i 22 Sep 2016
https://help.aliyun.com/document_detail/48573.htm