美文网首页
ssl 升级导致ssh key公钥不识别问题

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

作者: 小马将过河 | 来源:发表于2022-11-07 19:59 被阅读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。

相关文章

网友评论

      本文标题:ssl 升级导致ssh key公钥不识别问题

      本文链接:https://www.haomeiwen.com/subject/aghitdtx.html