Upgrade steps
wget https://wps-oss.oss-cn-shenzhen.aliyuncs.com/openssh_update.tar.gz
Tar xvf openssh_update.tar.gz
CP openssh_update/lib*/usr/local/lib/
Ldconfig
Dpkg-i Openssh_update/openssh_7.7p1-1_amd64.deb
#至此安装已经完成, the new Ssh+ssl is in the/usr/local/openssh/directory.
#下面进行测试. #测试阶段需要谨慎, otherwise the machine will not be able to connect via SSH
/usr/local/openssh/sbin/sshd-t-f/etc/ssh/sshd_config #如果有报错, please delete or modify the corresponding line as appropriate. If no error is checked, proceed to the next step.
#如果测试配置文件没有报错则用新的sshd覆盖旧的sshd
Mkdir/var/empty
Mv/usr/bin/ssh/usr/bin/ssh_old
Mv/usr/sbin/sshd/usr/sbin/sshd_old
cp/usr/local/openssh/sbin/sshd/usr/sbin/
cp/usr/local/openssh/bin/ssh/usr/bin/
mkdir/usr/local/openssh/etc/
Ln-s/etc/ssh/sshd_config/usr/local/openssh/etc/
#重启sshd #如果是测试机的话可以reboot一下机器测试一下
Kill-9 ' ps aux | grep sshd|head-n 1|awk ' {print $} '
/usr/sbin/sshd
The following is the source package compilation steps:
wget https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.7p1.tar.gz
wget http://www.zlib.net/zlib-1.2.11.tar.gz
wget https://www.openssl.org/source/openssl-1.1.0h.tar.gz
Tar xvf http://www.zlib.net/zlib-1.2.11.tar.gz
CD zlib &&./configure && make && make install
Tar xvf https://www.openssl.org/source/openssl-1.1.0h.tar.gz
CD openssl-1.1.0h &&./configure--prefix=/usr/local/openssl && make && make install
Tar xvf openssh-7.7p1
CD OPENSSH-7.7P1
wget http://www.linuxfromscratch.org/patches/blfs/svn/openssh-7.7p1-openssl-1.1.0-1.patchpatch -Np1 -i ./openssh-7.7p1-openssl-1.1.0-1.patch
./configure --prefix=/usr/local/openssh --with-ssl-dir=/usr/local/openssl
Make && make install
Packaged as a DEP package
Apt-get Install Checkinstall
Checkinstall
Enter the n carriage return #即可打包成dep包, and then copy the package to the other machine to perform dpkg-i openssh_7.7p1-1_amd64.deb.
ubuntu-14.04.5 upgrade sshd to the specified version openssh-7.7p1,openssl-1.1.0h.