Importing an OpenSSH Private Key into PuTTY / PuTTYgen

To use the private key generated with PuTTY on Windows, you need to convert it to the proprietary `.ppk` format using PuTTYgen. Here are the step-by-step instructions.

Your key should have been saved in a file named id_ed25519.

1. Open PuTTYgen

If you haven't already, download and install PuTTY (which includes PuTTYgen) from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html. Then launch the **PuTTY Key Generator (PuTTYgen)** application.

2. Import the OpenSSH Key

In the PuTTYgen menu, go to **Conversions → Import key**. Select the `id_ed25519` file from the folder where you saved it.

PuTTYgen Import Key (example)

3. Save the Key in PuTTY Format (.ppk)

If you want, you can protect the new key with a password. Just enter it in the "Key passphrase" and "Confirm passphrase" fields.

Click on **Save private key** to save the converted key in `.ppk` format. If you haven't set a protection password, a window will appear to warn you that you're saving the key in an unprotected format. Give the file a name, for example `sshta.ppk`.

4. Use the .ppk Key in PuTTY

Now open PuTTY to connect to the remote server. Go to:
**Connection → SSH → Auth → Credentials** Here you'll find the option **"Private key file for authentication"**: click on **Browse** and select the `.ppk` file you just saved.

PuTTY Auth Browse key (example)

Finally, go back to **Session**, enter "sshta.math.unipd.it" as the hostname if you want to connect to the server in Torre Archimede or "sshrc.studenti.math.unipd.it" for the server in the Ricci Curbastro building, enter the name "sshta" or "sshrc" in the "Saved sessions" field, and save the configuration by clicking on "Save".

PuTTY save session (example)

Now you can connect to the server by clicking on "Open".
It will ask for the username to connect with. The username to use is in the format "m0000..". You can find it on the previous key generation page.
If you want, you can save the username in "Connection -> Data -> Auto-login username".

For subsequent connections, you just need to double-click on the "sshta" entry in the "Saved sessions" window.

Useful Notes and Tips