首页 > 其他 > 详细

CentOS7.1 升级openssh到openssh-7.4p1

时间:2017-01-16 23:12:18      阅读:1643      评论:0      收藏:0      [点我收藏+]


准备软件包:

openssl-1.0.2j.tar.gz

openssh-7.4p1.tar.gz



一、升级openssl到openssl-1.0.2j

mv /usr/bin/openssl /usr/bin/openssl_bak

mv /usr/include/openssl /usr/include/openssl_bak


tar zxvf openssl-1.0.2j.tar.gz

cd openssl-1.0.2j/

./config --prefix=/usr/local/openssl_1.0.2j --shared

make && make install

ln -s /usr/local/openssl_1.0.2j/bin/openssl /usr/bin/openssl

ln -s /usr/local/openssl_1.0.2j/include/openssl/ /usr/include/openssl

echo "/usr/local/openssl_1.0.2j/lib" >> /etc/ld.so.conf

chmod 755 -R /usr/local/openssl_1.0.2j/

ldconfig -v

openssl version -a


二、升级openssh到openssh-7.4p1

mv /etc/ssh/ /etc/ssh_bak

mv /etc/init.d/sshd /etc/init.d/sshd_bak

cd ..

tar zxvf openssh-7.4p1.tar.gz

cd openssh-7.4p1/

./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-ssl-


dir=/usr/local/openssl_1.0.2j/ --with-md5-passwords --mandir=/usr/share/man

make && make install

\cp -f contrib/redhat/sshd.init /etc/init.d/sshd

sed -i ‘/\/sbin\/restorecon\ \/etc\/ssh\/ssh_host_key.pub/s/^/#/‘ /etc/init.d/sshd

echo "PermitRootLogin yes" >> /etc/ssh/sshd_config

service sshd restart

ssh -V


本文出自 “挥舞狂草,不屈姿态狂啸” 博客,请务必保留此出处http://jidong.blog.51cto.com/6212447/1892333

CentOS7.1 升级openssh到openssh-7.4p1

原文:http://jidong.blog.51cto.com/6212447/1892333

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!