When you create the VM, Azure generates a key pair and lets you download the .pem file (your private key). Windows users must first convert the .pem to a .ppk file for use with PuTTY as it uses the PPK format.
Prerequisites
- Download and install PuTTY & PuTTYgen****from the official PuTTY website.
- Keep your downloaded .pem private key file (for example,
ubuntu2404.pem) handy.
Steps to convert .pem key file to .ppk file
-
Launch PuTTYgen
- Open PuTTYgen (installed with PuTTY).
- In PuTTYgen, click Load.
-
Load the
.pemFile- In the file dialog, change the filter from PuTTY Private Key Files (*.ppk) to All Files (*.*) so you can see the
.pemfile. - Select your PEM file (For example,
ubuntu2404.pem). PuTTYgen displays a message: “Successfully imported foreign key.”
- In the file dialog, change the filter from PuTTY Private Key Files (*.ppk) to All Files (*.*) so you can see the
-
Save the Private Key as
.ppk-
Click Save private key.
-
A warning appears: “Are you sure you want to save this key without a passphrase to protect it?”
- Click Yes to save without a passphrase (easier but less secure).
- Click No to set a passphrase for added security (recommended).
-
Save the key with a descriptive name, for example,
ubuntu2404.ppk.
-