75

I wanted to connect to my Unix server using SSH keys. For that I had converted my id_rsa file from ./ssh directory to a ppk file using PuTTYgen, but after loading my .ppk key I get this warning:

PuTTY key format too new

enter image description here

If I use my default id_rsa file, then I get error:

OpenSSH SSH-2 private key (old PEM format)

Either way I am getting stuck. Can anyone please help me?

0

8 Answers 8

97

Easy way to fix this issue, please follow the pictures.
Step1:
enter image description here Step2:
enter image description here

1
  • 1
    After getting the same error, then doing this, I now get from Pageant "Couldn't load this key (Open SSH SSH-2 private key (old PEM format) - a rock and a hard place
    – PandaWood
    Apr 21, 2022 at 4:25
42

If you have a key in the new PPK version 3 format, you can use PuTTYgen to export it to the old PPK version 2 format.

I don't know what Operating System you're using PuTTYgen/PuTTY on, but if it's Microsoft Windows you can set PPK Version 2 by default for PuTTYgen selecting in the app menu:

Key->Parameters for saving key files... ->PPK file version: 2

PuTTYgen: Private Key File Parameters

2
  • I tried to load it in PuTTYgen, but it also says "too new"
    – Black
    Sep 17, 2021 at 10:40
  • 1
    @Black You need to use the latest version of PuTTYgen. What makes sense only, if you are stuck with old version of PuTTY on some system, where you need to use the new key. You can download the new version of PuTTYgen on another system, convert the key there, and copy it to the system with the old PuTTY. If you are free to use newest software directly, then go for latest version of PuTTY, and you won't have to convert anything. Note that the OP created/converted the key with latest PuTTYgen, but is trying to use it with old PuTTY. See my answer. Sep 17, 2021 at 10:53
7

You have probably used a newer version of PuTTYgen than the version of PuTTY.

There's new PPK format since PuTTY 0.75 (released 2021-05-09). So I guess you have used PuTTYgen 0.75 (or newer) to convert your key. But you are trying to use it in an older version of PuTTY.


If you are stuck with old version of PuTTU, the new PuTTYgen can generate even the old format: Go to Key > Parameters for saving key files > PPK file version.

0
3

I've put newer version of puttygen.exe and pageant.exe in TortoiseGit\bin folder and it works

1
  • By the time I got here, I had already setup keys. Replacing the outdated Tgit ones worked well.
    – Machavity
    Jun 4, 2021 at 21:27
2

Install the Latest version of putty at least 0.75 it will work fine

1

Had a similar issue,

  • key generated with PuTTYgen 0.75
  • works fine with PuTTY 0.75
  • fails with tortoiseGit 2.12.0.0 (format too new)

After reading answer by @martinprikryl

  • changed in TortoiseGit->Settings->Network->SSH client to PuTTY's plink - and it works again
1
0

If you don't want to or you can't upgrade due to security policies on your computer, you can download the binary for the newer puttygen.exe, run the binary and load your .ppk file. Once loaded, go into "Conversions" and select "Export OpenSSH key" and save as a .pem extension.

Next, using the older puttygen, go into "Conversions" and import the .pem file you generated. Once loaded, "Save private key" to a new .ppk file.

At this point you should be able to use the older putty.exe file to connect to your host with the .ppk file that you saved.

You can verify, assuming you have the .pub file, by saving the file as a new public key and compare the signatures between the 2 .pub files. The public key signatures, from my experience are the same.

Or as some has already stated, load your .ppk file, go into: Key -> "Parameters for saving keys files ..." and select PPK file version 2 and "Save private key".

1
  • So why would you mess with two versions of PuTTYgen, if you can do it with the new version of PuTTYgen only? Aug 31, 2021 at 17:19
0

You can convert the openssh key to version 2 or 3 with the "puttygen" utility. Example:

puttygen id_rsa --ppk-param version=2 -o id_rsa.ppk 

to convert the openssh id_rsa identity file to a version 2 ppk file. Version 3 is currently the newest version of the ppk format at the time of this answer.

You can install puttygen natively on Linux, using a Homebrew or MacPort port on macOS(what I did), or on Windows, use the puttygen docker container at https://hub.docker.com/r/zinuzoid/puttygen. The Mac and Linux syntax's are identical.

The Windows(docker) example syntax looks like this:

docker run --rm -v $(pwd):/app zinuzoid/puttygen id_rsa -O private-openssh --ppk-param version=2 -o id_rsa.ppk
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .