Centos6.6x系统与unbutu18.04系统升级ssh到8.3版本 (3)

        mv /usr/bin/openssl /usr/bin/openssl.bak && mv /usr/include/openssl /usr/include/openssl.bak && ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl && ln -s /usr/local/openssl/include/openssl /usr/include/openssl

        else

        exit 1

fi

 

if [ $? == '0' ];then

        echo '/usr/local/openssl/lib' >> /etc/ld.so.conf && ldconfig -v > /dev/null && echo $(openssl version)

        else

        exit 1

fi

 

if [ $? == '0' ];then

        cd /opt/ && tar zxf openssh-8.3p1.tar.gz -C /opt/ && cd openssh-8.3p1 && ./configure --prefix=http://www.likecs.com/usr  --sysconfdir=http://www.likecs.com/etc/ssh --with-zlib=http://www.likecs.com/usr/local/zlib --with-ssl-dir=http://www.likecs.com/usr/local/openssl --with-md5-passwords --with-pam=enable > /dev/null && make > /dev/null && make install > /dev/null

        echo "install openssh succeed"

              else

        exit 1

fi

 

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

echo 'PubkeyAuthentication yes' >>/etc/ssh/sshd_config

echo 'PasswordAuthentication yes' >>/etc/ssh/sshd_config

cp -p /opt/openssh-8.3p1/contrib/redhat/sshd.init  /etc/init.d/sshd

cp -p /opt/openssh-8.3p1/contrib/redhat/sshd.pam /etc/pam.d/sshd.pam

 

service sshd restart && ssh -V

 

 ******人生若只如初见******

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzzxdd.html