Make sure you have the putty-tools package installed. If not, you can install it using your package manager (e.g., apt or yum).
# For Debian/Ubuntu
sudo apt-get install putty-tools
# For CentOS/RHEL
sudo yum install putty-tools
Open a terminal window.
Use the puttygen command to convert your PEM private key to PPK format. Replace your-private-key.pem with the actual path to your PEM private key file and output-key.ppk with the desired name for the PPK file.
puttygen your-private-key.pem -o output-key.ppk -O private
You'll be prompted to enter a passphrase if your private key is protected with one. Enter the passphrase, and the conversion will be complete.
Your PPK private key file (output-key.ppk) is now ready to be used with PuTTY or other SSH clients on Windows.
Make sure you have PuTTY installed on your Windows system. You can download it from the official PuTTY website (https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html).
Launch PuTTYgen, which is included in the PuTTY installation package.
Click on the "Load" button.
In the "Load private key" dialog box, select the option to display all files, and then locate and select your PEM private key file.
Click "Open."
If your private key is protected with a passphrase, enter it in the "Enter passphrase to convert private key" field.
Click on the "Save private key" button.
Choose a location to save the converted PPK private key file, enter a filename (e.g., output-key.ppk), and click "Save."
Your PPK private key file is now saved and ready to be used with PuTTY or other SSH clients on Windows.