github 不接受私有 SSH 密钥

github 不接受私有 SSH 密钥

我在 Windows 系统上有一个私有 ED25519 SSH 密钥(使用 WSL)。私钥的权限为400,公钥的权限为444。当我测试我的连接时,使用此是我得到的响应。ssh -Tvvv [email protected]

debug1: Offering public key: /home/username/.ssh/id_ed25519 ED25519 SHA256:uO4IMeDU10K+ME5e2LPI/9dIvPu1tAefz2wx60I+AIA explicit agent
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51

我已经运行了ssh-keygen -lf ~/.ssh/id_ed25519显示指纹,并且我运行了ssh-keygen -lf ~/.ssh/id_ed25519.pub并且可以确认指纹匹配。对我来说,这表明密钥应该相互匹配(如果我的假设错误,请纠正我),但这似乎意味着type 51用户未经身份验证。我还可以确认公钥已上传到我的 github 帐户,同时我可以确认我已添加以下内容:

eval $(ssh-agent -s)
ssh-add -k ~/.ssh/id_ed25519

进入我的~/.bashrc文件。我很困惑为什么这不起作用。如果有人有任何建议,我很乐意得到其他人的意见。

相关内容