ssl 升级导致ssh key公钥不识别问题

2022-11-07  本文已影响0人  小马将过河

在本地生成了新的ssh公钥
命令:

ssh-keygen -t rsa -f ~/.ssh/id_rsa -C "shoufeng"

生成以后将id_rsa.pub配置到代码仓库,拉取代码,提示错误:

Administrator@XTZJ-20220220UO MINGW64 /d/06_git
$ git clone git@code.aliyun.com:41674-redcreation/xh-live-training.git
Cloning into 'xh-live-training'...
Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh-rsa
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

原因ssl升级,导致系统要增加配置项。~/.ssh/config文件(没有的话创建一个,注意没有扩展名)增加如下三行配置:

Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

Over。

上一篇下一篇

猜你喜欢

热点阅读