How To Use Putty to Connect to Amazon EC2 Instances

As data scientists and software engineers, we often find ourselves needing to access remote servers or cloud-based resources. One such resource is an Amazon Elastic Compute Cloud (EC2) instance. In this post, we will walk through the process of using PuTTY, a free and open-source terminal emulator, to connect to an Amazon EC2 instance.

How To Use Putty to Connect to Amazon EC2 Instances

As data scientists and software engineers, we often find ourselves needing to access remote servers or cloud-based resources. One such resource is an Amazon Elastic Compute Cloud (EC2) instance. In this post, we will walk through the process of using PuTTY, a free and open-source terminal emulator, to connect to an Amazon EC2 instance.

What Is PuTTY?

PuTTY is a popular SSH and telnet client, used to remotely connect to servers. It’s an essential tool for managing remote servers via command-line and supports various network protocols like SSH, Telnet, and rlogin.

Step 1: Download PuTTY

The first step is to download PuTTY. Navigate to the official PuTTY download page, and download the latest version suitable for your operating system.

Step 2: Convert Your PEM File to PPK

Amazon EC2 uses PEM files (.pem), but PuTTY requires its proprietary format called PPK (.ppk). To convert your PEM file to PPK, we’ll use PuTTYgen, which comes together with the PuTTY download.

  1. Open PuTTYgen and click ‘Load’ to import your .pem file.
  2. Once the PEM file is loaded, click ‘Save private key’ to save it as a .ppk file.

Step 3: Connect to Your EC2 Instance

Now that you have your PPK file, you’re ready to connect to your Amazon EC2 instance.

  1. Open PuTTY and navigate to the ‘Session’ category.
  2. In the ‘Host Name (or IP address)’ field, input your EC2 instance’s public DNS or IP address.
  3. In the ‘Port’ field, input the port number. By default, this is 22 for SSH.

Step 4: Load Your PPK Key File

Next, navigate to the ‘SSH’ category, then to ‘Auth’. Here, you’ll input your .ppk key file.

  1. Click ‘Browse’ and locate your .ppk file.
  2. Once loaded, return to the ‘Session’ category.

Step 5: Save Your Session (Optional)

Before connecting, you can save these settings for future usage. Under ‘Saved Sessions’, input a name for this session and click ‘Save’.

Step 6: Connect to Your Instance

Finally, click ‘Open’ to connect to your EC2 instance. If this is your first time connecting to the instance from this machine, you’ll see a security alert. Click ‘Yes’ to add the host key to PuTTY’s cache.

You’ll then see a terminal window asking for a login. For Amazon Linux, the default user name is ‘ec2-user’. For Ubuntu, it’s ‘ubuntu’.

And voila! You’re now connected to your Amazon EC2 instance via PuTTY.

In conclusion, PuTTY is a powerful tool that allows you to securely connect to your Amazon EC2 instances. With its ability to convert key files and save session details, it’s an excellent choice for data scientists and software engineers needing to interact with remote servers. By following these steps, you will be able to efficiently and effectively manage your cloud-based resources.

We hope this guide has been helpful. If you have any questions or run into any issues, don’t hesitate to reach out in the comments below.

Key Takeaways:

  • PuTTY is a free and open-source terminal emulator used to connect to remote servers.
  • Amazon EC2 instances use a .pem file, but PuTTY uses a .ppk file.
  • PuTTYgen, included in the PuTTY download, can convert .pem files into .ppk files.
  • Connected to your Amazon EC2 instance involves loading the .ppk file into PuTTY and inputting the appropriate host name and port.
  • Once connected, you can manage your EC2 instances as if you were there in person.

Targeted Keywords: PuTTY, Amazon EC2, SSH, terminal emulator, PEM file, PPK file, PuTTYgen, connect to EC2 instance, manage remote servers, data scientist, software engineer


About Saturn Cloud

Saturn Cloud is your all-in-one solution for data science & ML development, deployment, and data pipelines in the cloud. Spin up a notebook with 4TB of RAM, add a GPU, connect to a distributed cluster of workers, and more. Join today and get 150 hours of free compute per month.