CentOS7.1 升级openssh到openssh-7.4p1

前端之家收集整理的这篇文章主要介绍了CentOS7.1 升级openssh到openssh-7.4p1前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


准备软件包:

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

原文链接:https://www.f2er.com/centos/379012.html

猜你在找的CentOS相关文章