0
点赞
收藏
分享

微信扫一扫

解决更新到openssh8.9P1之后提示所选用户密钥未在远程主机上注册的问题.

野见 2022-03-25 阅读 17
linuxcentos

这个其实是新版本openssh弃用了RSA/SHA1密钥算法导致老旧客户端无法识别
如:xshell6 crt7.33以下版本 #这个自行更新软件即可

此次为服务器修改配置适应老旧客户端教程,因为我所在岗位有点特殊,不能连接外网,每次拿个新版本的软件进去都要各种审批.由于很多服务器,交换机都很古老,我只能升级部分重要的服务器.还要让这些升级的服务器支持老旧客户端,那么以下进入正题.

openssh制作成RPM包丢进服务器后更新这个教程我已经做了的就不重复了

先附上一段官方说明: #感谢jumpserver官方开发人员的解说
Incompatibility is more likely when connecting to older SSH
implementations that have not been upgraded or have not closely tracked
improvements in the SSH protocol. For these cases, it may be necessary
to selectively re-enable RSA/SHA1 to allow connection and/or user
authentication via the HostkeyAlgorithms and PubkeyAcceptedAlgorithms
options. For example, the following stanza in ~/.ssh/config will enable
RSA/SHA1 for host and user authentication for a single destination host:

Host old-host
    HostkeyAlgorithms +ssh-rsa
	PubkeyAcceptedAlgorithms +ssh-rsa

需要在服务器端的/etc/试试/sshd_config配置中增加
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
重启systemctl restart sshd 即可

也可以单独修改客户端的配置,让其可以连接服务器
vi /etc/ssh/ssh_config #增加如下内容
PubkeyAcceptedKeyTypes=+ssh-rsa

举报
0 条评论