17

There are lots of SO posts on this topic but most of them are for Windows and use the GUI. All others posts seem to use the CLI.

Is there a GUI version of puttygen on MacOS/Linux and if so instructions on how to install/use? The CLI seems to give me an error.

Usage: puttygen ( keyfile | -t type [ -b bits ] )
                [ -C comment ] [ -P ] [ -q ]
                [ -o output-keyfile ] [ -O type | -l | -L | -p ]


>puttygen mykey.pem -t rsa -b 2048 -o mykey.ppk
puttygen: cannot both load and generate a key

Is there something wrong with my commands?

codingknob
  • 11,108
  • 25
  • 89
  • 126

3 Answers3

48

AFAIK, there is no GUI for putty versions of OSX.

You can simply convert your key like this: puttygen mykey.pem -o mykey.ppk

smaftoul
  • 2,375
  • 17
  • 14
  • Thank you for the reply. I guess I'm wonder why do they give command options? The AWS instructions seem to require rsa type and 2048 bits as per their documentation. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html?icmpid=docs_ec2_console. Terrible documentation. – codingknob May 17 '16 at 22:06
  • No idea why they set the size in the GUI, there is no choice there, you don't convert an openssh 2048bita key to a putty 1024bits key ;) – smaftoul May 17 '16 at 22:09
  • 1
    Is `puttygen` available on mac? – Qasim Jun 21 '17 at 10:54
  • 2
    yes, you can install it with brew, or build in manually from sources. – smaftoul Jun 22 '17 at 12:21
  • 8
    run `brew install putty` for the correct formula. [http://brewformulas.org/Putty](http://brewformulas.org/Putty) On mac OSX 10.12.6, trying to install puttygen returns an error: `Error: No available formula with the name "puttygen" ` – Rrrapture Oct 11 '17 at 18:37
  • On my mac using 12.6.2 Monterrey I was able to run `brew install putty` with no issue. – Joseph Ishak Jan 13 '23 at 20:43
  • Converted PPK file is not working. – Alka Singla Mar 24 '23 at 12:32
2

Now you should type

puttygen Fishidentification.pem -o fishkey.ppk --ppk-param version=2

Because Putty/FileZilla ssh client applied PPK format version 2 not version 3. If you did not add the parameter --ppk-param version=2, puttygen will generate ppk file as PPK format 3 as default. The error message is shown below:

FATAL ERROR: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)

0

you can convert like this puttygen -t rsa -C name.pem -o name.ppk