no matching host key type found. Their offer: ssh-rsa
时间: 2023-11-07 08:17:37 浏览: 226
该错误表示在SSH连接中,无法匹配到适配的主机密钥类型。对于提供的主机密钥类型为ssh-rsa时发生了不匹配的情况。
为了解决这个问题,可以按照以下步骤操作:
1. 找到本地的SSH目录,通常位于C:\Users\用户名\.ssh。
2. 检查是否存在config文件,如果不存在,则创建一个config文件。
3. 在config文件中添加以下配置:
Host *
HostkeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa
4. 保存并关闭config文件。
5. 尝试再次使用git clone命令克隆代码。
这样,你应该能够成功克隆代码了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [.ssh目录中config配置文件](https://download.csdn.net/download/gongjin28_csdn/85413492)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Unable to negotiate with 100.12.0.7 port 22: no matching host key type found. Their offer: ssh-rsa](https://blog.csdn.net/qiuyu1998/article/details/124726695)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [解决no matching host key type found. Their offer: ssh-rsa报错信息具体方法](https://blog.csdn.net/weixin_43636782/article/details/123416064)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文