How to SSH into EC2 Instances (AWS)

November 26, 2017Leron AminComments Open

With most cloud platforms, such as Google Cloud (GCP) or Microsoft Cloud (Azure), an SSH client is built-in. However, AWS does not include a built-in SSH client, and therefore requires you to use a third-party client in order to SSH into your EC2 instances.

In this tutorial you will learn how use a third-party SSH client (known as PuTTY) in order to SSH into your AWS EC2 instances.

Managing your AWS website’s files requires you to SSH into your EC2 instance. This can be achieved by using an SSH client such as PuTTY.

If you prefer to use a cloud platform with a built-in SSH client, check out the Google Cloud (GCP) or Microsoft Cloud (Azure) tutorials.

Before getting started with this tutorial, you should have already deployed an EC2 instance such as WordPress on Amazon AWS EC2.

There are 4 steps in this tutorial:

  • 1. Download PuTTY

  • 2. Convert SSH Key File

  • 3. Copy DNS IP Address

  • 4. Configure PuTTY

1. Download PuTTY

ssh into aws ec2
PuTTY is the application that you will use to SSH into your AWS EC2 instance. You can download it for free here.

2. Convert SSH Key File

ssh into ec2 instance
After downloading PuTTY, open the PuTTY Key Generator application (PuTTYgen), and click the Load button to upload the key file that you downloaded in the previous step.
ssh into ec2 instance
Next, click the Save private key button.
ssh into ec2 instance
Make sure to save the file with the .ppk extension.

3. Copy DNS IP Address

ssh into aws ec2
From your AWS homepage, naviagate to your EC2 dashboard.
ssh into aws ec2
Click on Instances in the left sidebar menu.
ssh into aws ec2
Copy your instance’s Public DNS IP address.

4. Configure PuTTY

ssh into aws ec2
Open the main PuTTY application and enter your username (see list) followed by @ and the Public DNS IP Address that you copied from the last step into the Host field.
ssh into aws ec2
Next, navigate to the Auth section in the left-sidebar menu. Then, upload the PuTTY key file that you converted in the last step.
ssh into aws ec2
Lastly, navigate back to the the Session section at the top of the page, and click the Open button to establish the SSH connection.

Don’t know your username?

  • • For an Amazon Linux AMI, the user name is ec2-user.
  • • For a RHEL AMI, the user name is ec2-user or root.
  • • For an Ubuntu AMI, the user name is ubuntu or root.
  • • For a Centos AMI, the user name is centos.
  • • For a Fedora AMI, the user name is ec2-user.
  • • For SUSE, the user name is ec2-user or root.

If ec2-user and root don’t work, check with the AMI provider.
Source: Amazon AWS User Guide

That’s it!

ssh into ec2 instance
After you’ve successfully connected to your instance, you will see a window pop up with your instance details.

From this point forward, you’ll be able to quickly SSH into your EC2 instance simply by loading your instance’s saved Public IP address from the PuTTY dashboard.

If you have any questions or comments about this tutorial, be sure to post them below!

Thanks,

signature

Leave a Reply

Your email address will not be published. Required fields are marked *

Made with by

© 2020 One Page Zen Systems, LLC  
Legal  |  Privacy Policy  |  Affiliate Disclosure  |  Contact  

Join our Mailing List!

Exclusive early access to the latest tutorials

Monthly update with a list of upcoming tutorials

Special access to members-only events and webinars