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
相关推荐
不能跑的代码不是好代码3 小时前
Linux系统常用命令中文速查表
linux·运维·服务器
石一峰6994 小时前
深入理解 Linux 中断三层机制与 1-Wire 时序锁原理
linux·运维·服务器
运维老郭4 小时前
PostgreSQL编译安装实战
运维·postgresql
无限码农5 小时前
Linux上通过cmake编译uchardet
linux·运维·服务器
运维大师6 小时前
【Linux运维极简教程】06-网络配置与管理
linux·运维
007张三丰6 小时前
软件测试专栏(15/20):REST Assured接口自动化框架实战
运维·自动化·jenkins·接口自动化·rest·assured
ACP广源盛139246256736 小时前
IX8024@ACP# 搭配此芯 AI 服务器 + 爱芯元智产品完整方案
大数据·运维·服务器·人工智能·分布式·嵌入式硬件
huainingning9 小时前
交换机通过ftp下载文件或者传输文件到ftp服务器
运维·服务器·网络
edwarddamon9 小时前
CentOS 7 国内安装 Docker CE(阿里云源)
运维
Championship.23.2410 小时前
Linux 3.0 LVDS驱动开发详解
linux·运维·驱动开发·lvds