银河麒麟 OpenSSH 10.0p1(aarch64)安装升级完整步骤

来源:本站原创 点击数: 发布时间:2026年01月30日

 说明

适用于:
✔️ 麒麟/Kylin、openEuler、CentOS/RHEL
✔️ aarch64 系统
✔️ 从 openssh 8.x 升级到 openssh 10.x,用于修复安全软件检测的openssh漏洞问题

openssh 10.0p1 arm 版本附件包提供下载


1. 解压 tar 包

cd /opt
tar -xvf linux.openssh10.0p1.arm.tarcd aarch64

2. 卸载冲突包 openssh-help

rpm -e --nodeps openssh-help

说明:
openssh-help 是文档包,不影响运行,但升级时会冲突,因此先卸载。


3. 安装 OpenSSH 10.0p1 RPM

rpm -Uvh openssh-10.0p1-1.el8.aarch64.rpm \
openssh-clients-10.0p1-1.el8.aarch64.rpm \
openssh-server-10.0p1-1.el8.aarch64.rpm

✔️ rpm -Uvh 会自动覆盖旧版本
✔️ 升级期间不会影响现有 config 文件


4. 修改 SSH 配置文件

编辑文件:

vim /etc/ssh/sshd_config

找到下面三项:

RSAAuthentication
RhostsRSAAuthentication
GSSAPIKexAlgorithms

并注释掉它们:

# RSAAuthentication
# RhostsRSAAuthentication
# GSSAPIKexAlgorithms

🔍 为什么要注释?

在 OpenSSH 10 中,这些参数:

参数状态
RSAAuthentication已废弃
RhostsRSAAuthentication已废弃
GSSAPIKexAlgorithms不再支持

不注释会导致:

/etc/ssh/sshd_config: bad configuration option

并使 sshd 无法启动。


5. 检查 sshd 配置是否正确

sshd -t

输出为空 = 正常


6. 重启 SSH 服务

systemctl restart sshd

查看状态:

systemctl status sshd

预期输出为 active (running)


7. 查看侦听端口

netstat -lntp | grep sshd

示例:

tcp   0   0 0.0.0.0:1022    ... LISTEN

8. 查看 OpenSSH 版本(验证成功)

/usr/sbin/sshd -V

输出:

OpenSSH_10.0p1 ...

9. 让 sshd 开机自启

systemctl enable sshd