Compiling and Installing OpenSSH 9.0p1 on CentOS 7
Instructions:
-
Download the Source Code:
wget -c https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.0p1.tar.gz
-
Extract the Archive:
tar -xzvf openssh-9.0p1.tar.gz
-
Change Directory:
cd openssh-9.0p1/
-
Install Dependencies (Example for CentOS/RHEL):
yum groupinstall 'Development Tools' yum install -y pam-devel libselinux-devel zlib-devel openssl-devel
-
Configure the Build:
./configure --with-pam --with-selinux --with-privsep-path=/var/lib/sshd/ --sysconfdir=/etc/ssh
-
Compile the Source Code:
make
-
Install OpenSSH:
make install
-
Set Permissions on Key Files:
chmod 0600 /etc/ssh/ssh_host_rsa_key chmod 0600 /etc/ssh/ssh_host_ecdsa_key chmod 0600 /etc/ssh/ssh_host_ed25519_key
-
Disable GSSAPI Options (If Needed):
sed -i -e '/^GSSAPIAuthentication/ s/^/#/' -e '/^GSSAPICleanupCredentials/ s/^/#/' /etc/ssh/sshd_config
-
Restart the SSH Service:
sudo systemctl restart sshd
-
Verify Installation:
ssh -V
-
???
-
profit