问题描述
我想将 ed25519 私钥(由 ssh-keygen
命令生成)转换为 ppk 文件.但我得到了错误.
无法加载私钥(无法识别的密码名称)
有人可以帮我吗?
已测试的 openssh 版本:
OpenSSH_7.6p1, OpenSSL 1.1.0g 2 Nov 2017
和OpenSSH_7.6p1, OpenSSL 1.0.2n 2017 年 12 月 7 日
(在 CoreOS 上)和 ArchLinux docker 容器)测试的腻子版本:
0.70 64bit
、0.70 32bit
和snapshot
(在 Windows 10 上)
我的程序如下.
1.生成ed25519私钥
# ssh-keygen -t ed25519 -a 100生成公钥/私钥 ed25519 密钥对.输入保存密钥的文件 (/root/.ssh/id_ed25519):输入密码(空表示没有密码):再次输入相同的密码:您的身份信息已保存在/root/.ssh/id_ed25519 中.您的公钥已保存在/root/.ssh/id_ed25519.pub 中.关键指纹是:SHA256:2HfORujStwmC9c91rmDxMbaV9kVMT70gWxnRXAvNrNU root@f46f23bbad55钥匙的 randomart 图像是:+--[ED25519 256]--+|+X B||.+.@E||+ +.=||哦哦.o.||.S o + +oo||o = = +.=o||.o = B + o||o B = o ||= ...|+----[SHA256]-----+# cat .ssh/id_ed25519-----开始打开SSH私钥-----b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABClhk1367G8CQYpo/0c7UShAAAAZAAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIIJiwIymcly4s66pza/IL3ZNyT5CiMPj0R+/LnMDmABUAAAAoMJIakdbIL7TOAmX8n4xGSrtp8mc/Mr6qimZAZzGB7iRhNUXT+isPdf0YuC9mh5NbX43ZYFl+/sWdi2hVmJxbGTwrjaSdNzF3ZnSpi/aVlzFt3bUCtdwhHLaLqy9unw0zPHlfcQsB700GS/bf4VKRmm1+imj3cAldUm2RF3VdI0U9/04yXMj+VBOMevM0i7R/0d6xUFTH3zj99xxeLI2J6A=-----结束OPENSSH私钥-----# cat .ssh/id_ed25519.pubssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIJiwIymcly4s66pza/IL3ZNyT5CiMPj0R+/LnMDmABU root@f46f23bbad55
2.在 windows 上运行 puttygen.exe
并尝试导入 ed25519 私钥 (.ssh/id_ed25519
)
无法加载私钥(无法识别的密码名称)
2019-03-20 更新:
在撰写本文时,来自 https 的 puttygen 快照://www.chiark.greenend.org.uk/~sgtatham/putty/snapshot.html 似乎支持 0.70 不支持的这些键.更改日志中没有明确提及.
我测试了开发快照2019-01-17.53747ad
I want to convert an ed25519 private key (which is generated by ssh-keygen
command) to a ppk file. But I got the error.
Can someone help me?
tested openssh version:
OpenSSH_7.6p1, OpenSSL 1.1.0g 2 Nov 2017
andOpenSSH_7.6p1, OpenSSL 1.0.2n 7 Dec 2017
(on CoreOS and ArchLinux docker container)tested putty version:
0.70 64bit
,0.70 32bit
andsnapshot
(on windows 10)
My procedure is as follows.
1. Generate an ed25519 private key
# ssh-keygen -t ed25519 -a 100
Generating public/private ed25519 key pair.
Enter file in which to save the key (/root/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_ed25519.
Your public key has been saved in /root/.ssh/id_ed25519.pub.
The key fingerprint is:
SHA256:2HfORujStwmC9c91rmDxMbaV9kVMT70gWxnRXAvNrNU root@f46f23bbad55
The key's randomart image is:
+--[ED25519 256]--+
| +X B|
| . +.@E|
| + +.=|
| o o . o.|
| . S o + +oo|
| o = = +.=o|
| . o = B + o|
| o B = o |
| = ...|
+----[SHA256]-----+
# cat .ssh/id_ed25519
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABClhk1367
G8CQYpo/0c7UShAAAAZAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIIJiwIymcly4s66p
za/IL3ZNyT5CiMPj0R+/LnMDmABUAAAAoMJIakdbIL7TOAmX8n4xGSrtp8mc/Mr6qimZAZ
zGB7iRhNUXT+isPdf0YuC9mh5NbX43ZYFl+/sWdi2hVmJxbGTwrjaSdNzF3ZnSpi/aVlzF
t3bUCtdwhHLaLqy9unw0zPHlfcQsB700GS/bf4VKRmm1+imj3cAldUm2RF3VdI0U9/04yX
Mj+VBOmevM0i7R/0d6xUFTH3zj99xxeLI2J6A=
-----END OPENSSH PRIVATE KEY-----
# cat .ssh/id_ed25519.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIJiwIymcly4s66pza/IL3ZNyT5CiMPj0R+/LnMDmABU root@f46f23bbad55
2. Run puttygen.exe
on windows and try to import the ed25519 private key (.ssh/id_ed25519
)
Update 2019-03-20:https://www.chiark.greenend.org.uk/~sgtatham/putty/releases/0.71.html supports these keys
At the time of writing this, the puttygen snapshot from https://www.chiark.greenend.org.uk/~sgtatham/putty/snapshot.html seems to support these keys where 0.70 did not. It's not explicitly mentioned in the changelog.
I tested Development snapshot 2019-01-17.53747ad
这篇关于如何将 ed25519 私钥转换为腻子 ppk?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!