Skip to Content

Upgrade OpenSSH

How to upgrade OpenSSH version in RHEL, Rocky Linux and AlmaLinux?

Overview: This article will help Linux user to upgrade the OpenSSH version on RHEL-based operating systems.



Step 1: Install development tools and dependencies.

root@gateway:~# yum groupinstall "Development Tools" -y

root@gateway:~# yum install gcc -y

Step 2: Make sure to backup SSH configurations before upgrading.

root@gateway:~# cp /etc/ssh/sshd_config /etc/ssh/sshd_config.backup

Step 3: Check the currently supported key types and algorithms before upgrading.

root@gateway:~# sshd -T | grep -i 'key\|algorithms'

root@gateway:~# sshd -T | grep -i 'key\|algorithms' > ./sshd.backup

Step 4: Download the latest OpenSSH version tar.gz file.

root@gateway:~# wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.9p2.tar.gz

Step 5: Follow the steps below to extract and install the latest OpenSSH.

root@gateway:~# tar -xvf openssh-9.9p2.tar.gz

root@gateway:~# cd openssh-9.9p2

root@gateway:~# ./configure

root@gateway:~# make

root@gateway:~# make install

Step 6: Check the version after completing the above steps.

root@gateway:~# ssh -V

OpenSSH_9.9p2, OpenSSL 3.2.2 4 Jun 2024

Step 7: Check the supported key types and algorithms after upgrading.

root@gateway:~# sshd -T | grep -i 'key\|algorithms'


Related Articles:

How to upgrade OpenSSH in Centos ?

signature algorithm ssh-rsa not in PubkeyAcceptedAlgorithms

signature algorithm ssh-dss not in PubkeyAcceptedAlgorithms

DSA key based authentication is not working