前期准备
- 卸载原有的ssh
- 安装依赖库
- 安装数据压缩用的函式库zlib
- 安装openssl
- 安装openssh
查看当前版本在这里插入图片描述
1卸载Openssh Openssl
service sshd stop
apt purge openssl
apt purge ssh
2安装依赖包
apt install libzip-dev libssl-dev autoconf gcc libxml2 make
3编译安装zlib
wget http://www.zlib.net/zlib-1.2.11.tar.gz
tar -zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure --prefix=/usr/local
make
make install
4编译安装openssl
wget https://www.openssl.org/source/openssl-1.1.1.tar.gz --no-check-certificate
tar -zxvf openssl-1.1.1.tar.gz
cd openssl-1.1.1
./config shared --prefix=/usr/local/ssl
make test
make install
ln -s /usr/local/ssl/lib/libssl.so.1.