背景:
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/