convert .pem to .ppk on macos [closed]
Asked Answered
C

3

19

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?

Colincolinson answered 17/5, 2016 at 21:50 Comment(0)
P
53

There is no GUI for macos' putty versions.

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

Update: on macos to have puttygen, you can brew install putty

Perineurium answered 17/5, 2016 at 22:5 Comment(7)
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. docs.aws.amazon.com/AWSEC2/latest/UserGuide/…. Terrible documentation.Colincolinson
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 ;)Perineurium
Is puttygen available on mac?Annecy
yes, you can install it with brew, or build in manually from sources.Perineurium
run brew install putty for the correct formula. 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" Ruttger
On my mac using 12.6.2 Monterrey I was able to run brew install putty with no issue.Angling
Converted PPK file is not working.Raymer
U
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)

Urbanism answered 12/10, 2021 at 12:36 Comment(0)
D
0

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

Delmardelmer answered 5/5, 2022 at 13:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.