How to Connect to an Amazon Web Services (AWS) EC2 Instance Using SSH

This tutorial shows you how to connect to your AWS EC2 instance from a Windows 10 computer using SSH.

Prerequisites

  1. Download PuTTY a SSH and Telnet client for Windows
  2. Ensure you have your .pem file which you will have downloaded when you set up your key pair when creating your EC2 instance
  3. Create a .ppk file from a .pem file – see How to Create a PPK file from a PEM file – Windows 10
  4. Make a note of your instance’s public IP address

Connecting to the Instance

Step 1 – Open PuTTY, you will see a PuTTY Configuration window.


How to Connect to an Amazon Web Services (AWS) EC2 Instance Using SSH
PuTTY Configuration window

Step 2 – In the Host Name (or IP address) field enter the public IP address of your EC2 instance. Leave the port number at 22.

You can also enter the username to save time using ec2-user@ and then the IP address to save entering the username when logging in.



How to Connect to an Amazon Web Services (AWS) EC2 Instance Using SSH
Enter the username and public IP address of the instance

Step 3 – Click on the ‘+’ sign next to SSH to open the list of options.

How to Connect to an Amazon Web Services (AWS) EC2 Instance Using SSH
Click on ‘+’ next to SSH

Step 4 – Click on ‘Auth’.

How to Connect to an Amazon Web Services (AWS) EC2 Instance Using SSH
Click on ‘Auth’

Step 5 – Click on ‘Browse’ and select the .ppk private key file you created from the .pem file using PuTTYgen.

How to Connect to an Amazon Web Services (AWS) EC2 Instance Using SSH
Upload the .ppk file

Step 6 – Enter a name for the session in the ‘Saved Sessions’ field to save the settings entered above for quicker access next time you want to SSH into the same instance.

How to Connect to an Amazon Web Services (AWS) EC2 Instance Using SSH
Click on Session, enter a name and save

Step 7 – Click ‘Open’ and the terminal window should open

Leave a Reply