0

I am currently running Ubuntu 22.04.4 LTS with ssh version:

OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022

I want to update the current OpenSSH version to 9.2 or latter. This is requirement in order to setup PDC with my grafana server.

I have found a simmillar post:

Upgrade OpenSSH from v8.9 to v9.3 on 22.04.2 LTS?

However, I am just slightly concerned whether that is correct. In particular:

sudo systemctl stop sshd
sudo apt-get remove openssh-server openssh-client

Is it safe to execute those commands on a virtual server that I am connect via SSH? Will I not be disconnected from the VM?

There is also another post: Is possible to upgrade openssh-server OpenSSH_7.6p1, to OpenSSH_8.0p1?

That explains how to update OpenSSH version but different method:

sudo apt update
sudo apt install build-essential zlib1g-dev libssl-dev
sudo mkdir /var/lib/sshd
sudo chmod -R 700 /var/lib/sshd/
sudo chown -R root:sys /var/lib/sshd/
wget -c https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.9p1.tar.gz
tar -xzf openssh-8.9p1.tar.gz
cd openssh-8.9p1/
sudo apt install libpam0g-dev libselinux1-dev libkrb5-dev
./configure --with-kerberos5 --with-md5-passwords --with-pam --with-selinux --with-privsep-path=/var/lib/sshd/ --sysconfdir=/etc/ssh
make
sudo make install

I would like to clarify which process is the most optimal and safe to use to update OpenSSH on the client that I am currently connected via SSH

0 Answers0