注意事项:
1、安装包是纯净环境下编译生成,保证无毒
2、已经在阿里云ECS测试,可以正常升级
1、环境说明
阿里云的ECS,系统版本是centos7.9
[root@abc ~]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.9.2009 (Core)
Release: 7.9.2009
Codename: Core
[root@abc ~]# sshd -V
unknown option -- V
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
usage: sshd [-46DdeiqTt] [-C connection_spec] [-c host_cert_file]
[-E log_file] [-f config_file] [-g login_grace_time]
[-h host_key_file] [-o option] [-p port] [-u len]
[root@abc ~]# ssh -V
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
2、升级步骤
1、下载对应系统版本的rpm包
下载地址:https://download.csdn.net/download/weixin_44663310/89587188
2、把文件上传到服务器上,解压
[root@abc ~]# cd centos7/
[root@abc centos7]# ls
openssh-9.8p1-1.el7.x86_64.rpm openssh-debuginfo-9.8p1-1.el7.x86_64.rpm
openssh-clients-9.8p1-1.el7.x86_64.rpm openssh-server-9.8p1-1.el7.x86_64.rpm
3、备份文件
cp -R /etc/ssh /etc/ssh.bak
cp -R /etc/pam.d /etc/pam.d.bak
cp -R ~/.ssh ~/.ssh.bak
4、升级安装
yum -y install *.rpm
5、验证
[root@abc centos7]# sshd -V
OpenSSH_9.8p1, OpenSSL 3.0.14 4 Jun 2024
[root@abc centos7]# ssh -V
OpenSSH_9.8p1, OpenSSL 3.0.14 4 Jun 2024