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.

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

2 Answers 2

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.

1
  • 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. Commented May 18, 2015 at 10:49
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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.