Many times, you get the private key from the cloud provider to connect to the Virtual machine. Generally, the keys will be in OpenSSH format. If you directly try to use that key with Putty to connect to the VM machine, you will get failure.
we need to convert the private key into ppk format which is supported by Putty Tool. Here in this article, we will see how to convert into ppk format using puttygen tool
Step 1 First save the private key on the disk and create one copy of it also so that in case some failure happens you have the original key with you
Step 2 Now install Putty tool in case it is not done yet. This comes with Puttygen also
Step 3 Start the Puttygen session by going to All Programs > PuTTY > PuTTYgen
Make the type of key to generate is set to RSA and the Number of bits in a generated key is set to 2048
Step 4 Click on Load Button
Step 5 In the Load private key window, change the PuTTY Private Key Files (.ppk) drop-down menu option to All Files (.*).
Step 6 Select the private key which you have to save and click open. Now you will see the below dialog if the private key is a good one
Click OK. If you choose the wrong file, then the below error will occur
Step 7 Below window appears
Change the key comment from imported-openssh-key to something meaningful. This comment appears on your PuTTY screen when you connect to your VM and click on save private key
You can use passphrase for extra security
Step 8 Save the file in the appropriate location
Make sure save as type *.ppk format
If you not provided a passphrase in the earlier screen, you will get this extra screen
Click on Yes to continue
Step 9 Now you should be able to use this ppk file to connect the VM.
I hope this articles helps you.