码迷,mamicode.com
首页 > 其他好文 > 详细

centos升级openssh

时间:2018-03-05 15:31:45      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:OpenSSH 安全漏洞(CVE-201

务器版本:centos 6.8
openssh版本:openssh-7.5p1

1.升级openssl
wget https://www.openssl.org/source/openssl-1.0.2j.tar.gz
tar -xf openssl-1.0.2j.tar.gz
cd openssl-1.0.2j/ && ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl --shared

yum install -y openssl-devel
make && make install

mv /usr/bin/openssl /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
echo "/usr/local/openssl/lib">>/etc/ld.so.conf
ldconfig -v
echo ‘export OPENSSL=/usr/local/openssl/bin‘ >>/etc/profile
echo ‘export PATH=$OPENSSL:$PATH:$HOME/bin‘ >>/etc/profile
source /etc/profile
openssl version -a

2.升级openssh
wget https://mirrors.evowise.com/pub/OpenBSD/OpenSSH/portable/openssh-7.5p1.tar.gz
tar -xf openssh-7.5p1.tar.gz && cd openssh-7.5p1
yum install -y zlib-devel pam-devel tcp_wrappers-devel
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-pam --with-tcp-wrappers --with-ssl-dir=/usr/local/openssl
make && make install
ssh -V

#这一行为允许root账户登录
echo ‘PermitRootLogin yes‘ >> /etc/ssh/sshd_config
service sshd restart

centos升级openssh

标签:OpenSSH 安全漏洞(CVE-201

原文地址:http://blog.51cto.com/yenokia/2083055

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!