我想将由ssh-keygen
命令生成的ed25519私钥转换为ppk文件,但是我遇到了错误。
无法加载私钥(未识别的密码名称)
有人可以帮帮我吗?
测试的openssh版本:
OpenSSH_7.6p1,OpenSSL 1.1.0g 2 Nov 2017
和OpenSSH_7.6p1,OpenSSL 1.0.2n 7 Dec 2017
(在CoreOS和ArchLinux docker容器上)测试的putty版本:
0.70 64位
,0.70 32位
和快照版
(在Windows 10上)
我的步骤如下。
1. 生成ed25519私钥
# 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. 在Windows上运行puttygen.exe
,尝试导入ed25519私钥(.ssh/id_ed25519
)
无法加载私钥(未识别的密码名称)