大网数据广告活动
服务器运维问答

To generate key for AWS server using ssh-keygen from .pem for PuTTY

· 52CE 我爱测

AWS gave me a private key in the format of .pem . I am trying to use it with PuTTY but failed and I read I need to generate a key with PuTTYgen but PuTTYgen is only for Windows. So I am trying to use the Linux command ssh-keygen …

问题原文

原帖链接 · Alex · CC BY-SA 3.0

AWS gave me a private key in the format of .pem. I am trying to use it with PuTTY but failed and I read I need to generate a key with PuTTYgen but PuTTYgen is only for Windows. So I am trying to use the Linux command ssh-keygen. But what is exactly the command that can generate such a key that PuTTY can use?

BTW, I can connect with console using ssh without problem with the .pem file.

已采纳解答

原帖链接 · Martin Prikryl · CC BY-SA 4.0

To convert the .pem key to the .ppk key using the *nix command-line version of the puttygen use:

puttygen mykey.pem -o mykey.ppk

See the puttygen man page.

There's PuTTY rpm and "putty-tools" package available for many *nix distributions.


The .ppk format is proprietary to PuTTY, so tools outside of PuTTY toolset (like the ssh-keygen) do not support it.

Note that you can convert the key on Windows using GUI version of PuTTYgen and still use the converted key on Linux.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-05-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。