Couldn't load private key - Putty key format too new
Problem
Couldn't load private key - Putty key format too new
Attempting to SSH a cloud instance, you get this (or a similar) message:
When you use PuTTygen to generate or convert to a ppk key and leave PuTTygen settings as default, you might experience this issue.
The issue/image above is from Solar-PuTTy (v3.0.1.1197), but the problem could happen using any FTTP or SSH client. For instance, In MobaXterm (Personal Edition v21.4 Built 4786), you get from the terminal:
No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)
From PuTTy version 0.75, the program uses a new format to generate the SSH private key; it uses ppk version 3. However, PuTTY 0.74 or earlier versions can't read this format, and this can be a problem for programs that use PuTTY internally, like Solar PuTTY or MobaXtermn. If the internal PuTTY version is not compatible with PPK version 3, the program can't use keys created with a default setting of PuTTY 0.75.
Solution
You can generate a new SSH key pair or change the private key format of an existing private key using PuTTygen.
Step 1: Change the PuTTygen PPK File Version to version 2.
Run the PuTTYgen program. Go to Key > Parameters for saving key files...
Change the PuTTygen PPK File Version to version 2.
Step 2: Generate a new SSH key pair or change the format of an existing one.
After following step one, you can now generate a key using the ppk version 2. You will be able to SSH to the cloud instance. This option is better if you are just creating the cloud instance.
Click on Generate a public or public key pair, click on Generate. Click Save private key, to save the key with the old ppk format.
Or, if you have already created a cloud instance using the new ppk format (version 3), the best option is to change the format of that key and convert it to the (old) version 2.
Click on Load and search for your ppk key (version 3). Click Save private key, to convert the key to the old ppk format.
No comments:
Post a Comment