CentOS7 系列升级至 openssh9.8
压缩包中涉及如下文件:
openssh-9.8p1-3.el7.x86_64.rpm
openssh-clients-9.8p1-3.el7.x86_64.rpm
openssh-server-9.8p1-3.el7.x86_64.rpm
openssh-debuginfo-9.8p1-3.el7.x86_64.rpm
更新使用脚本:
#卸载当前系统 openssh 相关内容
rpm -e --nodeps `rpm -qa | grep openssh`
#按顺序安装 openssh rpm 包
rpm -ivh openssh-9.8p1-3.el7.x86_64.rpm
rpm -ivh openssh-server-9.8p1-3.el7.x86_64.rpm
rpm -ivh openssh-clients-9.8p1-3.el7.x86_64.rpm
rpm -ivh openssh-debuginfo-9.8p1-3.el7.x86_64.rpm
#检查 openssh 版本
ssh -V
#重启 sshd 服务
systemctl restart sshd
启动失败、报错
Failed to start SYSV: OpenSSH server daemon.
(code=exited, status=1/FAILURE)
#sshd -t
显示文件权限问题
重新授权文件
#chmod 600 /etc/ssh/ssh_host_rsa_key
#chmod 600 /etc/ssh/ssh_host_ecdsa_key