Skip to content

Instantly share code, notes, and snippets.

@prbinu
Last active March 14, 2024 08:08
Show Gist options
  • Select an option

  • Save prbinu/7fe8c8171ea3db62f7f2d68338b33fdb to your computer and use it in GitHub Desktop.

Select an option

Save prbinu/7fe8c8171ea3db62f7f2d68338b33fdb to your computer and use it in GitHub Desktop.

Revisions

  1. prbinu revised this gist Oct 18, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion openssh-7.6-ubuntu-16.04.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # on a fresh Ubuntu 16.04 host
    sudo apt-get update

    # copy the packages from https://launchpad.net/debian/+source/openssh/1:7.4p1-10+deb9u3
    # copy Ubuntu source packages from http://archive.ubuntu.com/ubuntu/pool/main/o/openssh

    wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_7.6p1-4.dsc
    wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_7.6p1.orig.tar.gz
  2. prbinu created this gist Oct 18, 2018.
    34 changes: 34 additions & 0 deletions openssh-7.6-ubuntu-16.04.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    # on a fresh Ubuntu 16.04 host
    sudo apt-get update

    # copy the packages from https://launchpad.net/debian/+source/openssh/1:7.4p1-10+deb9u3

    wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_7.6p1-4.dsc
    wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_7.6p1.orig.tar.gz
    wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_7.6p1.orig.tar.gz.asc
    wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_7.6p1-4.debian.tar.xz

    tar -zxvf openssh_7.6p1.orig.tar.gz
    tar -xvf openssh_7.6p1-4.debian.tar.xz

    # install build dep packages
    sudo apt-get install -t xenial-backports devscripts autotools-dev debhelper dh-autoreconf dh-exec dh-systemd libaudit-dev libedit-dev libgtk-3-dev libkrb5-dev libpam-dev libselinux1-dev libssl-dev libwrap0-dev zlib1g-dev libsystemd-dev -y
    sudo apt-get install build-essential fakeroot dpkg-dev

    dpkg-source -x openssh_7.6p1-4.dsc
    cd openssh-7.6p1/
    dpkg-buildpackage -rfakeroot -b

    # now package would have been succesfully built on root directory (cd ../)
    cd ..
    ls -ltr *.deb

    # lets install new openssh deb package
    #stop ssh
    sudo systemctl stop ssh

    #install
    sudo dpkg -i --force-confold openssh-client_7.6p1-4_amd64.deb openssh-server_7.6p1-4_amd64.deb openssh-sftp-server_7.6p1-4_amd64.deb

    # check the version now
    ssh -V