ubuntu升级openssh和openssl

sudo apt update  -y  #ubuntu升级所有包
sudo apt install build-essential  -y #安装gcc编译器
apt-get install libpam0g-dev   -y  #安装libpam0g-dev
sudo apt-get install libssl-dev  -y #安装libssl-dev
gcc --version  #检查gcc是否安装成功  

下面开始升级open-ssh
1、下载zlib 编译安装

wget http://zlib.net/zlib-1.2.11.tar.gz

tar xf zlib-1.2.11.tar.gz && cd zlib-1.2.11/

./configure && make && make install

2、# 安装OpenSSH
wget https://fastly.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.1p1.tar.gz

tar xf openssh-8.1p1.tar.gz && cd openssh-8.1p1/

备份启动脚本以及配置文件
cp /etc/init.d/ssh /etc/init.d/ssh.old && cp -r /etc/ssh /etc/ssh.old

安装OpenSSH
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-pam --with-zlib --with-privsep-path=/var/lib/sshd

make && make install



这个看你需求,这里我不写
openssl升级
到官网下载openssl-1.0.2r.tar.gz (https://www.openssl.org/source/)
./config && make && make install
查看版本号
openssl version

发布了147 篇原创文章 · 获赞 9 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/weixin_44049466/article/details/104918211