SUSE 15.2升级Openssh9.5
公司有部分SAP的机器用的SUSE,懒得弄rpm包了.直接编译安装
1. 添加阿里云源
zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/15.2/repo/oss/ openSUSE-15.2-Oss
zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/15.2/repo/non-oss/ openSUSE-15.2-Non-Oss
zypper addrepo -f https://mirrors.aliyun.com/opensuse/update/leap/15.2/oss/ openSUSE-15.2-Update-Oss
zypper addrepo -f https://mirrors.aliyun.com/opensuse/update/leap/15.2/non-oss/ openSUSE-15.2-Update-Non-Oss
2. 安装依赖包
zypper in gcc gcc-c++ glibc make autoconf zlib zlib-devel pam-devel
3. 安装openssl
选了个1.1.1w
cd /root
wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz
tar xf openssl-1.1.1w.tar.gz
cd openssl-1.1.1w/
./config shared && make && make install
4. 升级安装Openssh
因为实验环境全部放/root了生产环境小伙伴别这么搞
cd /root
wget https://mirrors.aliyun.com/pub/OpenBSD/OpenSSH/portable/openssh-9.5p1.tar.gz
tar xf openssh-9.5p1.tar.gz
cd openssh-9.5p1/
./configure --with-default-path=/usr/local/bin:/bin:/usr/bin \
--with-superuser-path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin \
--with-openssl-includes=/usr/local/include/openssl \
--with-ssl-dir=/root/openssl-1.1.1w \
--with-mantype=man \
--disable-strip \
--without-openssl-header-check \
--without-pam
make -j4 && make install
systemctl restart sshd
5. 升级确认
localhost:~ # ssh -V
OpenSSH_9.5p1, OpenSSL 1.1.1d 10 Sep 2019