Skip to main content

Background

When you have created and launched an AWS Linux EC2 instance, you can connect to it from your computer using the SSH protocol. PuTTY is a free SSH client that allows you to do this from a local computer running Windows. Once the connection has been established, you work within the EC2 instance just like you would on a local computer running Linux.

Prerequisites

Generate a PuTTY Private Key (.ppk) File

  1. Download and install PuTTY.
  2. Open the folder that PuTTY was installed to (default path is C: > Program Files > PuTTY).
  3. Double-click on the file puttygen.exe.
  4. In PuTTY Key Generator, click the Load button and navigate to the folder that contains the private key file (.pem) created during the EC2 configuration process.
Image shows where to click Load in the PuTTY Key Generator.
Image Caption

Click Load in the PuTTY Key Generator.

   5.  Click on the PuTTY Private Key Files button in the lower-right corner of the window and select All Files (*.*).
 

Image shows how to select All Files in PuTTY Private Key Files
Image Caption

Select All Files in PuTTY Private Key Files

   6.  Select your private key file (.pem) and click Open.

Image shows how to give your PuTTY Private Key file a name
Image Caption

Select and open your private key.

   7.  Click OK to close the PuTTYgen Notice pop-up window.

Image shows a screenshot of the PuTTYgen Notice
Image Caption

PuTTYgen Notice

   8.  In PuTTY Key Generator, make sure Type of key to generate value is set to RSA.

Image shows how to generate RSA key.
Image Caption

Generate RSA key.

   9.  Click Save private key and then Yes to close the PuTTYgen Warning pop-up.

Image shows the PuTTYgen Warning
Image Caption

PuTTYgen Warning

   10.  Navigate to the location you want to store your PuTTY Private Key file (.ppk) and give it a name.
   11.  Click Save.
   12.  Close the PuTTY Key Generator window.

Image shows how to give your PuTTY Private Key file a name
Image Caption

Give your PuTTY Private Key file a name.

Connect to EC2

  1. Open PuTTY by clicking on the desktop icon or the putty.exe file in the PuTTY folder.
  2. In the Host Name (or IP address) box, type “ubuntu@your_public_DNS” (1).

Note: The Public DNS for your instance is displayed in AWS in the EC2 Management Console Instance Description in the middle of the screen.

   3.  Make sure:

  • Port is set to 22 (2).
  • Connection type is SSH (3).
Image shows the PuTTY Configuration window.
Image Caption

PuTTY Configuration window.

   4.  In the Category pane on the left of the PuTTY Configuration window, under Connection, click on the + next to SSH to expand the choices (4), then click on Auth (5).
   5.  Under Authentication parameters, click Browse and navigate to the directory where your PuTTY Private Key (.ppk) file is located (6).

  • Click on the (.ppk) file to select it.

   6.  Click Open. Note: If you want to save these settings to use later, navigate to Sessions in the PuTTY Category tree. Enter a name in the Saved Sessions box and click Save on the right.

Image shows the PuTTY Configuration window.
Image Caption

PuTTY Configuration window.

   7.  Click Open in PuTTY Configuration to connect to your Instance.

  • If this is the first time you have connected to your Instance, a PuTTY Security Alert will ask you whether to proceed with the connection.
  • Click Yes to complete the connection.
  • The EC2 Instance window will appear (black screen below).
Image shows the PuTTY Security Alert
Image Caption

PuTTY Security Alert

Image shows the window confirming connection to EC2 Instance
Image Caption

You are now connected to your EC2 Instance

Details

Last Updated

Published on

Data Centers

Alaska Satellite Facility DAAC (ASF DAAC)