codingknob
codingknob

Reputation: 11680

convert .pem to .ppk on macos

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?

Upvotes: 19

Views: 41158

Answers (3)

smaftoul
smaftoul

Reputation: 2721

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

Upvotes: 54

Lackson Munthali
Lackson Munthali

Reputation: 378

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

Upvotes: 0

Chitsai Yeh
Chitsai Yeh

Reputation: 66

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)

Upvotes: 2

Related Questions