ssh no matching host key type found. Their offer: ssh-rsa

前两天升级macOS 13 Ventura后链接公司堡垒机出现一下问题

➜  ~ ssh -p 222 ****@****
Unable to negotiate with *** port 222: no matching host key type found. Their offer: ssh-rsa

升级后的系统openssh版本不再支持ssh-rsa算法,知道问题原因就可以解决了

方法1 终端命令添加-oHostKeyAlgorithms=+ssh-rsa
方法2 本地~/ssh/config文件中追加以下内容

Host rk
 User root
 HostName 107.174.172.136
 port 222
 # 追加内容
 HostKeyAlgorithms ssh-rsa
 PubkeyAcceptedKeyTypes ssh-rsa

版权声明:本文为weixin_44600422原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。