1, install the required package
Yum-y Install gcc* make perl pam pam-devel zlib-devel tcp_wrappers-devel bzip2-devel openssl-devel ncurses-devel SQLite -devel Readline-devel Tk-devel
2. Installing OpenSSL
wget Https://www.openssl.org/source/openssl-1.0.2l.tar.gztar XF openssl-1.0.2l.tar.gzcd openssl-1.0.2l./config-- Prefix=/usr/local/openssl && make && make Installln-s/usr/local/openssl/include/openssl/usr/include /openssl
3. Add the newly compiled OpenSSL library to the system dynamic database link
echo "/usr/local/openssl/lib" >>/etc/ld.so.conf
4, Installation OpenSSH
mv/etc/ssh//etc/sshbakwget Https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-7.6p1.tar.gztar XF OPENSSH-7.6P1.TAR.GZCD openssh-7.6p1./configure--prefix=/usr--sysconfdir=/etc/ssh--with-pam--with-ssl-dir=/usr/ Local/openssl--with-md5-passwords--mandir=/usr/share/man--with-kerberos5=/usr/lib64/libkrb5.somake && Make installcp/etc/sshbak/*/etc/ssh/
Note that the new version is not allowed to login directly to the root, to change the permitrootlogin to Yes
Sed-i '/permitrootlogin/[email protected]^#@@ '/etc/ssh/sshd_configservice sshd restart
This article is from the "Baby God" blog, make sure to keep this source http://babyshen.blog.51cto.com/8405584/1973724
Upgrade OpenSSH under Linux