How To Connect An Amazon EC2 Linux Instances Using Putty

Connect to Amazon EC2 instance using putty

From a Windows machine, you can connect to an Amazon Linux instance using putty or the java plugin option provided by Amazon. The best way to connect to a Linux EC2 instance is using putty.

In this tutorial, I will explain how to connect an EC2 instance using putty software.

Step 1: Download putty

Download putty from here – Download Putty

You need to download both puttygen.exe and putty.exe.

The key file you download from the AWS console will be a .pem file. Since putty uses .ppk file extensions for authentication, you need puttygen to convert the .pem file to .ppk format.

Step 2: Convert .pem to .ppk using puttygen

Open puttygen.exe and load the .pem private key you downloaded when you created the ec2 instance.

It looks likeexample.pem. Once you open the .pem file a pop-up window will appear, asking you to save the private key. Click ok and click the save private key button.

Save the .ppk file in any folder.

Note: Do not click generate a key or any other buttons. Just load the pem file and click the save the private key button.

generate .ppk file from .pem file.

Step 3: Connect to ec2 Instance using SSH client putty.

Open putty.exe and enter the host name or IP (public or elastic IP)  as shown in the figure below.

Eg: “” or if you have given an elastic IP for your instance, then you should enter that elastic IP in the host field.

putty configuration to connect to ec2 instance.

Now go to connection–>data and type in the user name.

username differs for different instance types.

  1. For Ubuntu the default user name is ubuntu
  2. For RHEL and Amazon Linux instance the default user name is ec2-user
  3. For SUSE instance the default user name is a root
entering username in putty

Now got to SSH–>Auth click on Auth and load the .ppk file you generated using puttygen.

add ppk file to putty to connect to ec2 instance.

Click open. The connection will be established.

established connection to ec2 instance from Putty.

You don’t have to give any user name or password because the connection will be established using the private key.

If you get any errors while connecting, leave a comment below. The figure shown below is a connection established using the username “ubuntu“. 

  1. Pingback: How To Install and Setup Drupal On Amazon EC2 InstanceComtechies
Leave a Reply

Your email address will not be published.

You May Also Like