ubuntu-14.04.5 upgrade sshd to the specified version openssh-7.7p1,openssl-1.1.0h.

Source: Internet
Author: User
Tags openssl

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.