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
相关推荐
fuyongliang1231 小时前
linux Nginx服务配置介绍,和配置流程
运维·服务器·网络
2501_920047033 小时前
git在Linux中的使用
linux·git·elasticsearch
UNbuff_03 小时前
Linux bzip2 命令使用说明
linux·运维·服务器
小马哥编程3 小时前
DNS解析中的服务器协作机制
服务器·git·github
IOT-Power3 小时前
Ubuntu下把 SD 卡格式化为 FAT32
linux·运维·ubuntu
衍余未了4 小时前
centos9 docker启动不起来,docker启动发生堵塞问题!
运维·docker·容器
LJC_Superman4 小时前
Web与Nginx网站服务
运维·服务器·前端·网络·数据库·nginx·vim
proware4 小时前
昇腾310i Pro固件说明
linux·运维·服务器
烟雨书信5 小时前
安全运维和系统安全
运维·安全
tianyuanwo6 小时前
Docker Registry 实现原理、适用场景、常用操作及搭建详解
运维·docker·容器·registry