SSH - Install an older version of OpenSSH on Linux from Source

by
Jeremy Canfield |
Updated: November 22 2023
| SSH articles
Most Linux systems include OpenSSH. On a Red Hat distribution (CentOS, Fedora, Red Hat), dnf list installed or yum list installed can be used to determine if OpenSSH is already installed.
]# yum list installed | grep -i openssh
openssh.x86_64 8.7p1-30.el9_2 @System
openssh-clients.x86_64 8.7p1-30.el9_2 @System
openssh-server.x86_64 8.7p1-30.el9_2 @System
To install a specific version of OpenSSH, you are going to download the OpenSSH installation tarball from one of the mirrors listed at https://www.openssh.com/portable.html#http. For example, wget can be used to download the openssh-8.0p1.tar.gz file.
wget https://mirrors.gigenet.com/pub/OpenBSD/OpenSSH/portable/openssh-8.0p1.tar.gz
Extract the tar archive.
tar -zxpf openssh-8.0p1.tar.gz --directory /tmp
You can now remove the tar archive.
rm openssh-8.0p1.tar.gz
Move into the extracted directory.
cd /tmp/openssh-8.0p1
And then run the configure script.
./configure
And then run the make command.
sudo make
Now OpenSSH should be installed at /tmp/openssh8.0/sshd in this example.
~]# /tmp/bash-4.4.18/bash -version
GNU bash, version 4.4.18(1)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Did you find this article helpful?
If so, consider buying me a coffee over at