AWS: Use PuTTY to login to EC2 instance

Neel Ratan
3 min readJan 24, 2022

When you AWS EC2 service for cloud computing using Linux you will have the availability of Linux terminal to setup your whole service. The process of getting an SSH access to the terminal is different in Windows and Linux system. This story cover the details to get an SSH access for a Windows operating system using PuTTY, a multi-solution package for Secure shell protocol (SSH), and Teletype Network Protocol (Telnet).

At the end of the wizard for creating of an EC2 instance will you get the page where you can create a new RSA key pair for SSH or use an existing one. Either way you will have a downloaded key pair in .pem file type.

First thing we need to do is to convert the key pair into a key file type that is supported by PuTTY. PuTTY has is developed it’s own file type i.e. PuTTY Private Key (PPK). We can convert the .pem file to .ppk file using PuTTYgen that is a side installation software with PuTTY.

We should click on the Load button in the PuTTYgen to open the .pem file.

After that click on Save private key to save the key in .ppk format. Remember that a private key or pem key pair should not be shared and should be stored secure as it gives admin level access to your service.

For additional security we can add a passphrase before saving but for now we will skip it. If a windows prompts to warn that we are saving the file without passphrase set, we can skip it for now.

Click on Connect button in the EC2 dashboard.

Here we will find the public IP address and user name we need to using while login from SSH terminal. Copy this IP address and paste it in PuTTY’s Host name input in the Session tab.

Then, Connection > SSH > Auth tab

Click on Browse to select the save .ppk file and click on Open. This will open a SSH terminal.

Use the user name provided in the EC2 connect dashboard. In my case this is ‘ubuntu’.

After authentication we now have access to Linux terminal of the EC2 instance.

Thank you for the read.

--

--