This article describes the server upgrade OpenSSH mode in the case of network and no network.
First, introduce a no network how to upgrade:
1, prepare the relevant package
openssh:http://mirror.internode.on.net/pub/openbsd/openssh/portable/
OpenSSL related package Download: http://www.openssl.org/source/
Pam Related package Download: http://pkgs.org/centos-6/centos-x86_64/
Zlib Package Download: http://zlib.net/
2, installation Zlib
TAR-XVF zlib-1.2.8.tar.gz
CD zlib-1.2.8
./configure--prefix=/usr/local/zlib && make && make install
3, Installation Openssl-fips
Tar zxpf openssl-fips-2.0.5.tar.gz
CD Openssl-fips
./config
Make && make install
4. Installing OpenSSL
TAR-XVF openssl-1.0.1h.tar.gz
CD openssl-1.0.1h
./config FIPS--shared
Make && make install
5. Add the newly compiled OpenSSL library to the system dynamic database link
echo "/usr/local/ssl/lib" >>/etc/ld.so.conf
Ldconfig
6, install Pam, first uninstall the old version
View version information: Rpm-qa|grep Pam
Uninstall old version: Rpm-e--nodeps pam-1.1.1-17.el6.x86_64
Install Pam: Install it sequentially
RPM-IVH tcp_wrappers-devel-7.6-57.el6.x86_64.rpm
pam-1.1.1-20.el6_7.1.x86_64.rpm
pam-devel-1.1.1-20.el6_7.1.x86_64.rpm
7, Installation OpenSSH
Tar zxpf openssh-7.1p1.tar.gz
CD OPENSSH-7.1P1
./configure \
--PREFIX=/USR \
--SYSCONFDIR=/ETC/SSH \
--with-md5-passwords \
--with-pam \
--with-tcp-wrappers \
--WITH-SSL-DIR=/USR/LOCAL/SSL \
--with-zlib=/usr/local/zlib \
--without-hardening
Make && make install
8, add to the system services, restart SSHD upgrade success
Chkconfig--add sshd
Service sshd Restart
Second, in the case of a network
1.Tar xvf openssh-7.1p1.tar.gz
CD openssh-7.1
./configure--PREFIX=/USR--sysconfdir=/etc/ssh
Make
Make install
2. If the following environmental problems occur when configuring:
Configure:error: * * * zlib.h missing-please install first or check config.log * * *
Installing dependent packages using Yum install OpenSSL openssl-devel-y
3, the configuration is successful, can be compiled, if there is no make environment, install with the following command can be
Yum install make automake gcc gcc-c++ gcc-g77-y
4, the above method will overwrite the original version of the file,make install overwrite /etc/ssh under the configuration file may error. Then delete the original configuration file under/etc/ssh, then make the install once.
If you cannot log in remotely using root, modify/etc/ssh/sshd_config
Change the Permitrootlogin parameter to Yes.
These two methods of personal testing success, such as the above can not be achieved please consult the relevant questions or comments together to resolve
Two ways to upgrade OpenSSH