Here’s how to load a PEM private key into PuTTYgen, convert it to a PPK file, and set up PuTTY so you can connect to your Linux virtual machine with SSH key authentication.

Step 1. Load the PEM Key in PuTTYgen

Open PuTTYgen.

At the top of the window, click File, then choose Load private key.

3. When the file dialog opens, find and select your .pem file.

4. After PuTTYgen shows a message that the key was imported successfully, click OK.

Step 2. Save the Converted Private Key

After you import the PEM key, you will see its details in PuTTYgen.
Click “Save private key” and save the file as a .ppk, which is the format PuTTY uses.

Step 3. Configure PuTTY to use the PPK Key

Start by opening PuTTY. In the left menu, go to Connection, then SSHAuth – Credentials.
Next to ‘Private key file for authentication‘ click ‘Browse…’ and choose the .ppk file you saved earlier.

Step 4. Enter VM Connection details

On the left side, select “Session” at the top.

Fill in these details:

Host Name (or IP address): Type in your VM’s public IP address.

Port: Specify the Port number as shown in your configuration (e.g., 63900).

Ensure that the Connection Type is set to “SSH

Click “Open

Step 5. Accept the security alert

When you connect for the first time, PuTTY will show a Security Alert about the host key.
Click Accept to trust and save it.

Step 6. Log in to the Linux VM

When you see the prompt, type in your SSH username, such as azureuser.
You are now logged in with your public and private key pair.

You have successfully connected to your Linux VM with PuTTY using your SSH key.
Share This