Introduction
In this article, we will discuss the issue of OpenSSL version mismatch when compiling OpenSSH 9.9p2 on CentOS 6.2. We will cover the key concepts related to this topic, including the importance of version compatibility and the steps to resolve the version mismatch. By the end of this article, you will be able to successfully compile OpenSSH 9.9p2 on CentOS 6.2.
Understanding the Issue
When attempting to compile OpenSSH 9.9p2 on CentOS 6.2, users may encounter a version mismatch issue with OpenSSL. This is due to the fact that the pre-installed OpenSSL version on CentOS 6.2 (1.0.1e-57.el6\_3) is not compatible with the version required by OpenSSH 9.9p2 (3.0.16 or higher).
Why Version Compatibility Matters
Version compatibility is crucial for successful compilation and operation of software. In this case, the required OpenSSL version for OpenSSH 9.9p2 is higher than the pre-installed version on CentOS 6.2. This means that the pre-installed OpenSSL version may lack certain features or have bugs that can cause compilation errors or affect the functionality of OpenSSH 9.9p2.
Steps to Fix OpenSSL Version Mismatch
To resolve the OpenSSL version mismatch issue, we need to manually install a compatible version of OpenSSL and then compile OpenSSH 9.9p2. Here are the steps to do this:
Install Dependencies: Before installing a new version of OpenSSL, make sure to install the required dependencies by executing the following command:
sudo yum install -y gcc gcc-c++ libtool pcre-devel zlib-devel openssl-develDownload and Install OpenSSL: Download the OpenSSL source code (version 3.0.16 or higher) from the official website https://www.openssl.org/source/ and extract it using the following commands:
wget https://www.openssl.org/source/openssl-3.0.16.tar.gz tar -xvzf openssl-3.0.16.tar.gz cd openssl-3.0.16Next, configure and install OpenSSL with the following commands:
./config --prefix=/usr/local/openssl-3.0.16 shared sudo make installConfigure and Compile OpenSSH: Now, set the environment variable for the newly installed OpenSSL version by executing the following command:
export OPENSSL_INCLUDE_DIR=/usr/local/openssl-3.0.16/includeThen, download the OpenSSH 9.9p2 source code from the official website https://www.openssh.com/releases.html and extract it using the following commands:
wget https://www.openssh.com/pub/openssh-9.9p2.tar.gz tar -xvzf openssh-9.9p2.tar.gz cd openssh-9.9p2Finally, configure and compile OpenSSH with the following commands:
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-ssl-dir=/usr/local/openssl-3.0.16 && sudo makeInstall OpenSSH: After the successful compilation, install OpenSSH with the following command:
sudo make install
- Type: Article
- References: