no matching host key type found

ssh指定密钥登录服务器失败

Their offer: ssh-rsa 问题解决

修改ssh配置文件 ~/.ssh/config 添加如下配置 (没有 config 文件则新增)

1
2
3
# 追加内容
HostKeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa
Author: xinker
Link: http://example.com/2023/03/15/ssh拉取代码错误/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.