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

1 现象

升级了MacOS以后,git不能用了,重新配置了idea的git配置

无法拉取代码,重新拉取报错

2 原因

是因为OpenSSH 8.8以后的版本禁止使用 SHA-1 哈西算法的 RSA 签名

https://www.openssh.com/txt/release-8.8

3 解决

我是mac电脑。使用 vim ~/.ssh/config

sh 复制代码
Host icode.baidu.com
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa

windows 使用 vim ~/.ssh/config 如下

sh 复制代码
Host icode.baidu.com
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedkeyTypes +ssh-rsa
相关推荐
程序猫A建仔1 分钟前
【物联网】基于树莓派的物联网开发【4】——WIFI+SSH远程登录树莓派
运维·物联网·ssh
山师第一深情18 分钟前
ssh connect to remote gitlab without authority
服务器·ssh·gitlab
luck_me51 小时前
如何远程执行脚本不留痕迹
linux·运维·服务器
-SGlow-1 小时前
Linux相关概念和易错知识点(40)(HTML资源交互、网页管理、搜索引擎)
linux·运维·服务器·网络·html·交互
默心1 小时前
centos7部署mysql5.7
linux·运维·mysql·centos
-SGlow-2 小时前
Linux相关概念和易错知识点(39)(URL、HTTP)
linux·运维·http
因缘而起12 小时前
【Linux】gcc从源码编译安装,修改源码,验证修改的源码
linux·运维·服务器
Luck_ff08102 小时前
服务器选购指南:从零开始了解服务器
运维·服务器
山川而川-R3 小时前
开机自启动python程序_ubuntu22.04
linux·运维·服务器
haven-8523 小时前
win11安装Joplin Server私有化部署(docker)
运维·docker·容器