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
  • 22,138
  • 7
  • 45
  • 75
  • For the first solution (update putty to version 0.75), I have read and try many way to install putty version 0.75 in ubuntu 20.04, but seem like ubuntu 20.04 just support putty version <= 0.73. Can you give me some guide to install putty version 0.75 in ubuntu 20.04.

    For second solution, I dont know how to do this. Can you give me some guide for this solution?

    – Shou Nov 14 '22 at 04:05
  • I do not use PuTTY, so cannot write any guide on how to install a more recent version with 20.04. That said, this fine answer will show you how to use ssh-keygen to generate a new key pair – matigo Nov 14 '22 at 04:22
  • 1
    I have file .ppk in my ubuntu but dont know anything in client computer. So how can I use this file with .ppk? I have read guide you give me but not understand. Can you explain for me? Thanks. – Shou Nov 14 '22 at 07:36