Install OpenSSH-Server 9.6 on Ubuntu (Any Version, Passes Compliance)

preview_player
Показать описание
You may need to install openssh-server 9.6 to pass compliance. This video shows you how to compile openssh-server on Ubuntu server. Since many Ubuntu version repositories do not have openssh-server 9.6 yet.

FULL COMMAND LIST (rechecked on 4/9/24 on Ubuntu Server 22.04.4):
Check ssh version with:
ssh -V

sudo apt update
sudo apt install build-essential zlib1g-dev libssl-dev libpam0g-dev libselinux1-dev libkrb5-dev
sudo mkdir /var/lib/sshd
sudo chmod -R 700 /var/lib/sshd/
sudo chown -R root:sys /var/lib/sshd/
cd openssh-9.6p1
./configure --with-kerberos5 --with-md5-passwords --with-pam --with-selinux --with-privsep-path=/var/lib/sshd/ --sysconfdir=/etc/ssh
make
sudo make install
cd /usr/sbin
sudo cp /usr/local/sbin/sshd sshd
sudo reboot

Check Out Our Other Channels:
Рекомендации по теме
Комментарии
Автор

Good documentation, and clearly works for you and many others here in the comments. For me, unfortunately, I followed everything and the only difference is that 9.7 was available so decided would use that instead, and when trying the make install part I got "Privilege separation user sshd does not exist". And there doesn't seem to be a useful explanation for this error online, as far as I an tell. Lots of people had it, but always there is confusion about how they fixed it and why they did what they did.

UPDATE: I managed to add the required group and usr for SSHD and repeated the process. The error no longer occurs, but then the file /usr/sbin/sshd doesn't exist. I found that the file sshd was already created in /usr/local/sbin

brianhoskins
Автор

Thanx for that great tutorial. It works like a charm.
One thing: in your command list, you have two small mistakes.
Instead of,
tar -xzf openssh-8.9p1.tar.gz
cd openssh-8.9p1
it should be:
tar -xzf openssh-9.6p1.tar.gz
cd openssh-9.6p1

Anaxarchos
Автор

Awesome! It worked for me! Do you also have the same solution for RHEL9? Please make one video buddy!

noelvarma
Автор

if this was right in no longer is, the packages do not have a extracted directory as you say, they are just called SSH at their root, also the configure folder doesnt existing in the extraction

johnturner
Автор

if i want to upgrade the openssh remote via ssh, will it disconnect the current ssh session?

azizihack
Автор

undefined reference to `OpenSSL_add_all_algorithms'

znotft