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
相关推荐
zhangfeng113320 小时前
适合 5人以内小团队的Git 工作流 + Code Review + 自动化部署方案 FastAdmin +linunx服务器宝塔系统 外包项目 —
服务器·git·自动化·php·代码复审
倔强的石头10621 小时前
【Linux 指南】文件系统系列(一):磁盘底层原理 —— 从物理结构到 CHS与LBA 寻址全解析
linux·运维·服务器
陶然同学1 天前
【Linux及Shell】VMware&Ubuntu&Xshell安装
linux·运维·xshell8·xftp8
小乐笙1 天前
笔记:纯真 IP 库使用
运维·网络·tcp/ip
咖喱o1 天前
DHCP
linux·运维·服务器·网络
IMPYLH1 天前
Linux 的 touch 命令
linux·运维·服务器·bash
uestcwhc1 天前
服务器定时发送邮件设置
运维·服务器
雷工笔记1 天前
MES 系统设备管理模块详细设计方案
大数据·运维·网络
wangchunting1 天前
VMware17 使用Rocky Linux 9.7系统
linux·运维·服务器