How to Login to OpenStack Instance or VM via PuTTY using Key?

Updated on September 3, 2017

Question: I installed OpenStack Icehouse on my test bed and was able to create instances successfully. But I was not able to login to CentOS instance via PuTTY using the key file (.pem). However, I was able login via SSH command. Can someone tell me how to login to instance via PuTTY using key file? Thanks – Ravi

Answer: Since you are able to login to an instance via SSH command, then I assume you passed the key file (.pem) as an argument to the ssh command. For example, as shown below:

ssh -i mykey.pem centos@ip-address

Successful login via SSH command means that your key file is valid and it should work with PuTTY as well. But to login via PuTTY, there’s an extra step.

1. You need to download and launch PuTTY keygen tool.

2. Click on”Load” button to load your key file (for e.g mykey.pem)

3. Once loaded, you should save private key by clicking “Save private key” button.

Note: Since you are saving the private key, it’s advised to protect it with a passphrase.

putty key gen tool

4. PuTTY keygen will save the file in .ppk format and that’s the format PuTTY can understand.

5. Launch PuTTY, input username and IP address details.

6. To load the .ppk file, expand “SSH” (on the left side menu) and click “Auth“.

7. Lookout for “Private key file for authentication” and input .ppk file.

login to vm via putty

8. That’s it! Click “Open” to make a connection to the said machine.

How to use PPK file with SSH command?

Jump to this link to learn how to convert PPK file to a format that OpenSSH supports and login to using SSH command.

You might want to read PuTTY tips and tricks.

And the Bonus is here…

Was this article helpful?

Related Articles

Leave a Comment