加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows – 无效的公共ssh密钥

发布时间:2020-12-14 02:13:12 所属栏目:Windows 来源:网络整理
导读:尝试按照 github上的说明为 Generating SSH Keys for windows. 我运行ssh-keygen -t rsa -C“my@email.com”,输入密码并显示正确生成SSH密钥. 但是,当尝试在GitHub上“添加SSH密钥”时,它会给我错误 Key is invalid. It must begin with ‘ssh-rsa’ or ‘ss
尝试按照 github上的说明为 Generating SSH Keys for windows.

我运行ssh-keygen -t rsa -C“my@email.com”,输入密码并显示正确生成SSH密钥.

但是,当尝试在GitHub上“添加SSH密钥”时,它会给我错误

Key is invalid. It must begin with ‘ssh-rsa’ or ‘ssh-dss’. Check that you’re copying the public half of the key

Windows生成的公钥如下所示:

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "2048-bit RSA,my@email.com"
*public key*
---- END SSH2 PUBLIC KEY ----

最值得注意的是,它不是以’ssh-rsa’或’ssh-dss’开头的.我试过复制* public key *部分并在其前面添加’ssh-rsa’,但我在GitHub上得到了同样的错误.我有什么想法我做错了吗?

解决方法

得到它了.公钥应如下所示:

ssh-rsa *public key* my@email.com

那是:

ssh-rsa<space><public key ending with ==><space><email address>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读