Last active
October 3, 2020 08:50
-
-
Save jschroed91/c6474509f2f7d1fc159c5b8443707143 to your computer and use it in GitHub Desktop.
Install openSSH 7.6 on Ubuntu 14.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Installing deps..." | |
sudo apt-get install libssl-dev zlib1g-dev libpam0g-dev xz-utils | |
sudo apt-get remove openssh-server | |
echo "Downloading and extracting sources..." | |
wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.6p1.tar.gz | |
wget http://www.linuxfromscratch.org/patches/downloads/openssh/openssh-7.6p1-openssl-1.1.0-1.patch | |
tar -xf openssh-7.6p1.tar.gz | |
cd openssh-7.6p1 | |
echo "Applying patch and running configure and make..." | |
patch -Np1 -i ../openssh-7.6p1-openssl-1.1.0-1.patch && | |
./configure --prefix=/usr \ | |
--sysconfdir=/etc/ssh \ | |
--with-md5-passwords \ | |
--with-privsep-path=/var/lib/sshd \ | |
--with-pam && | |
make | |
echo "Installing..." | |
make install && | |
install -v -m755 contrib/ssh-copy-id /usr/bin && | |
install -v -m644 contrib/ssh-copy-id.1 \ | |
/usr/share/man/man1 && | |
install -v -m755 -d /usr/share/doc/openssh-7.6p1 && | |
install -v -m644 INSTALL LICENCE OVERVIEW README* \ | |
/usr/share/doc/openssh-7.6p1 | |
echo "Downloading and symlinking init script..." | |
cd ../ | |
wget http://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/blfs-bootscripts-20180105.tar.xz | |
tar -xf blfs-bootscripts-20180105.tar.xz | |
cd blfs-bootscripts-20180105 | |
make install-sshd | |
ln -s /etc/rc.d/init.d/sshd /etc/init.d/sshd | |
echo "Restarting sshd service..." | |
sudo service sshd restart | |
echo "DONE!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@phumpal updated, thanks!