Convert Amazon .pem key to Putty .ppk key Linux

3

5

I have generated and downloaded a private .pem key from AWS. However, to use Putty in order to connect to the virtual machine, I must have that key in .ppk format. The process of conversion is detailed in roughly 20 lines here:

I am using Linux Mint (an Ubuntu distro) and I know I can use puttygen in the terminal. However, I have no idea how to use this tool, nor how to configure the needed parameters. When I type puttygen --help I get

PuTTYgen unidentified build, Aug  7 2013 12:24:58
Usage: puttygen ( keyfile | -t type [ -b bits ] )
                [ -C comment ] [ -P ] [ -q ]
                [ -o output-keyfile ] [ -O type | -l | -L | -p ]
  -t    specify key type when generating (rsa, dsa, rsa1)
  -b    specify number of bits when generating key
  -C    change or specify key comment
  -P    change key passphrase
  -q    quiet: do not display progress bar
  -O    specify output type:
           private             output PuTTY private key format
           private-openssh     export OpenSSH private key
           private-sshcom      export ssh.com private key
           public              standard / ssh.com public key
           public-openssh      OpenSSH public key
           fingerprint         output the key fingerprint
  -o    specify output file
  -l    equivalent to `-O fingerprint'
  -L    equivalent to `-O public-openssh'
  -p    equivalent to `-O public'

But I have no idea whatsoever on how to do what the website tells me to do and all my tentatives failed so far.

How do I do what the website tells me to do, using puttygen on the terminal?

Flame_Phoenix

Posted 2014-02-21T16:30:58.117

Reputation: 415

Why do you need to use putty for this, especially from linux? What's wrong with normal ssh from the terminal? (mostly asking out of curiosity) – nerdwaller – 2014-02-21T16:37:09.833

1puttygen yourKey.pem -o yourKey.ppk -O private – Darth Android – 2014-02-21T16:38:59.773

1

In the future, please don't cross-post

– nerdwaller – 2014-02-21T17:02:15.760

Answers

11

You want to run it something like this:

puttygen yourKey.pem -o yourKey.ppk -O private

Flags:

  • -o Tells it where to write out the converted putty private key
  • -O private Tells it that you want a putty private key (as opposed to the other output formats it can produce).

Darth Android

Posted 2014-02-21T16:30:58.117

Reputation: 35 133

1

You can use puttygen to do the same, please refer this article

convert pem file to ppk

learn aws

Posted 2014-02-21T16:30:58.117

Reputation: 11

1Please don't just leave links. Instead, include important steps in your answer. Links can break, get deleted, etc... – confetti – 2018-08-18T17:27:37.167