How to connect Amazon EC2 instance by using PuTTY

Amazon EC2 stands for Amazon Elastic Compute Cloud. Amazon web service offers resizable cloud capacity through AmazonEC2. It is a cloud service that enables the user virtual server known as an “instance” on AWS infrastructure.

connect amazon linux instance by using putty

PuTTY is a free and open source that allows the user for remote connection. It is a terminal operator. It supports protocols like SFTP, SSH, SCP, and Telnet. It also provides a file transfer facility.

Connect to Amazon EC2 Instance

When you launch the Amazon Linux EC2 service, you can access it from the computer by using PuTTY SSH protocol. it is a free SSH client enables you to manage, ec2 Linux instances on a local computer. Once the connection is made, you can control EC2 on the local computer.

There are a few primary requirements before connecting to EC2 Linux instance from Windows: –

You need an Amazon Web Service account.

You should create and launch the Linux instance, which might takes few minutes for instance.
Generate the SSH key on EC2 instance.

You have to find your DNS name and IP of the instance.

Download the latest version of PuTTY on your Windows system.

Convert .pem to .ppk file 

PuTTY does not support the .pem key file format of private key. You have to convert the .pem file to a .ppk file to connect to your ec2 instance. For this, you can use PuTTYgen tool is provided by PuTTY.

Connect to EC2 Linux instance

Open PuTTY, Start Menu>All Program>PuTTY.

PuTTY configuration window

In the Host name section enter the Public DNS username or IP address of ec2 instance. The public DNS information is shown in the Amazon web service in the EC2 management console instance located in the middle of the screen.

IP address of Amazon EC2

Set the port no. 22. Set the connection type to SSH. On the left panel of PuTTY configuration, navigate to Connection>SSH>Auth>Credentials. 

Upload private key in PuTTYgen

Choose browse section under the authentication parameter. Then locate .ppk file that you create early and save in the directory. Click on open.

Open private key

Click open in PuTTY configuration to initiate the connection. For the first time for connection PuTTY Security Alert will ask to proceed connection. Click on “yes”.

Establish connection to Amazon EC2

The EC2 Linux instance will appear.

You are now successfully connect to the EC2 Linux instance using PuTTY.