ssh登录交换机报错Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa

今天在现场调试交换机,开启ssh后用本地电脑远程ssh报错,如图

image

 

解决方法:

1、在本地 .ssh文件夹中创建config文件,config文件没有后缀,并复制下列代码到config文件中【第一行 * 说明对所有主机生效,当然你也可以指定对应主机地址】

Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

image

 

2、然后重新ssh登录交换机就可以了

posted @ 2025-09-18 23:44  凡是過往;皆為序章  阅读(236)  评论(0)    收藏  举报