win10 git 命令行出现 no matching host key type found. Their offer: ssh-rsa 解决方案


背景:

win10电脑, 公私钥都已经配置好。

 

一 现象:

1. 配置好公私钥之后,仍然无法直接用 git ssh的方式,下载代码。

2. 出现形如

   no matching host key type found. Their offer: ssh-rsa 的错误.

 

二. 解决方案:

C:\Users\walkerjiang\.ssh\config

 

增加以下二项

HostKeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa

最终如下:

Host git.oa.com
HostName git.oa.com
User xxxx  #用户名
Port 12345  #真实端口
IdentityFile C:\Users\xxxxx\.ssh\私钥名   
HostKeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa

 

解决问题来源参与:

https://www.linuxquestions.org/questions/linux-security-4/no-matching-host-key-type-found-their-offer-ssh-rsa-ssh-dss-4175701155/


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM