Saturday, November 23, 2019

Converting PuttyGen private key to OpenSsh in Ubuntu

I recently had a need to convert a private key generated in Windows 10 using PuttyGen. I am using the private key to connect to my remote server. When I log in to my Ubuntu box, I also would like to use the same private key. Here's what I did:

Convert ppk to OpenSsh format:

puttygen <path-to-your.ppk> -O private-openssh -o <path-to-your-private-key>

You will be prompted to enter your private key password (if you had it).

To use the converted private key to connect to the server:
ssh -i <path-to-your-private-key> <username@yourhost>

No comments: