1

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.

  • As Martin's answer mentions, putty and puttygen are available for Linux. In Ubuntu for example, puttygen is part of the putty-tools package. – Andrew Schulman May 18 '15 at 8:36
3

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.

  • Thanks. It seems opensuse does not have such tool package unfortunately. Maybe console ssh is good enough. – Alex May 18 '15 at 10:09
  • I meant to use ssh command in terminal to connect instead of putty. Sorry, in fact puttygen is available when I install putty in opensuse. I thought there's a package called puttygen. Thanks a lot. – Alex May 18 '15 at 10:49
  • Sorry. New to the site, I tried to upvote and failed so thought that I couldn't do nth... – Alex May 18 '15 at 13:04
0

You need to convert the provided PEM file to PPK file using Puttygen tool in Windows.

  • Open puttygen and click on import key option in the menu.
  • Once it is imported you will see the button which says "Save Private Key".
  • Save it as a xyz.ppk file name and they load that ppk file in putty and login.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.