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