2

I have a file name.ppk. I'm want to login ssh with .ppk file on Ubuntu Terminal.

I have try this post Login SSH with .ppk file on Ubuntu Terminal but getting this error "puttygen: error loading `name.ppk': PuTTY key format too new" when using this command line "puttygen name.ppk -O private-openssh -o name.pem"

Puttygen version: 0.73

Ubuntu version: 20.04

Shou
  • 21

2 Answers2

0

In order to convert the new v3 ppk file to pem, you need to use puttygen 0.75 or newer. At the time of writing this, v0.73 is the latest you can get using apt, but you can download and build the newest version of puttygen from source.

This answer on SuperUser explains how to do this for v0.76 for instance:

  1. If putty is installed, uninstall it
sudo apt remove putty-tools
  1. Download the unix source code of the 0.76 version of putty
mkdir putty_source_code
cd putty_source_code
wget https://the.earth.li/~sgtatham/putty/0.76/putty-0.76.tar.gz
  1. Extract the unix code
tar -xvf putty-0.76.tar.gz
cd putty-0.76
  1. Compile the unix code
./configure
make
sudo cp puttygen /usr/bin/
  1. Check if the version was installed correctly
puttygen --version # Should output something similar to `puttygen: Release 0.76`
  1. Remove the downloaded source code, you no longer need it now that you have installed it in /usr/bin
cd ../..
rm -rf putty_source_code
  1. Change to the directory with the .ppk file

cd <dir_with_ppk_key> puttygen <ppk_key_name.ppk> -O private-openssh -o pem_generated_file.pem

You should now have the converted key on the directory

I had the same issue you were describing and using the steps above worked for me. I hope they will for you too.

-1

If the source key was created with a newer version of PuTTY, then you will not be able to use PuTTYgen 0.73. This is because a new PPK format has been used since 0.75.

You will need to use a newer version of PuTTYgen or use ssh-keygen to create a Public/Private key pair.

matigo
  • 24,752
  • 7
  • 50
  • 79