Skip to content

Instantly share code, notes, and snippets.

@stevehenderson
Last active July 3, 2024 01:14
Show Gist options
  • Save stevehenderson/95dd0cc1b0612ec34c63062f7c48f67c to your computer and use it in GitHub Desktop.
Save stevehenderson/95dd0cc1b0612ec34c63062f7c48f67c to your computer and use it in GitHub Desktop.
Upgrading SSHd on Ubuntu 22.04

Upgrading SSHd on Ubuntu 22.04

Grab the source:

> wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.8p1.tar.gz

> sha1sum openssh-9.8p1.tar.gz
a0bb501b11349f5c5c33a269351be091dc2c2727  openssh-9.8p1.tar.gz

Verified sha1: https://www.openssh.com/releasenotes.html

Compile and install (as root):

tar xvf openssh-9.8p1.tar.gz 
cd openssh-9.8p1/
apt install build-essential zlib1g-dev libssl-dev libpam-dev
./configure --with-md5-passwords --with-pam --with-privsep-path=/var/lib/sshd/ --sysconfdir=/etc/ssh
make
make install
---

Move the binary into place

which sshd #confirm location of current sshd -- e. g. /usr/sbin/sshd mv sshd /usr/sbin/sshd



systemctl restart sshd
sshd -V

Should show:

OpenSSH_9.8p1, OpenSSL 3.0.2 15 Mar 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment