How to install Ubuntu on AWS

Published: December 1, 2025 (Updated: Dec 1, 2025)

Enjoying this content? Subscribe to the Channel!

Mastering AWS: A Step-by-Step Guide to Deploying Ubuntu EC2 and Connecting with PuTTY


Hi there, this is Darren O’Neill from Darren’s Tech Tutorials, and I’m excited to walk you through one of the most fundamental skills in cloud computing: setting up an Ubuntu Linux virtual server on Amazon Web Services (AWS) EC2.

Whether you’re building a website, running a development environment, or just exploring the cloud, Ubuntu is a fantastic choice. We’ll cover everything from launching the instance and securing it, to generating the necessary keys and connecting from your Windows machine using PuTTY and PuTTYgen.

Let’s get started and launch your very first Ubuntu cloud server!


## Step 1: Launching Your EC2 Instance on AWS

The first thing we need to do is jump into the AWS Management Console and start the process of provisioning our server.

  1. Navigate to EC2: In the AWS Console, click on Services and search for EC2 (Virtual Servers in the Cloud).
  2. Start Launch Wizard: On the EC2 dashboard, click Launch Instance.
  3. Select the Ubuntu AMI: In the search bar, type ubuntu. We are looking for the official Ubuntu Server image that is marked as Free Tier eligible. Click Select.
  4. Choose Instance Type: We will keep the default selection, which is typically the t2.micro instance type. This is usually free tier eligible and perfect for testing. Click Next: Configure Instance Details.

## Step 2: Configuring Connectivity and Security

This is where we define how our server operates and, critically, how we will securely connect to it.

  1. Assign Public IP: Ensure that the setting Auto-assign Public IP is enabled. This is crucial as it gives your server a public address so you can access it over the internet.

  2. Add Storage: Click Next: Add Storage. We will leave the default storage size at 8 GB (General Purpose SSD), which is sufficient. You can always increase this if your project requires more space.

  3. Add Tags (Best Practice): Click Next: Add Tags. Adding tags helps you organize and identify your resources. Click Add Tag and use the Key Name (with a capital N) and give it a value, such as Darren's Test Server.

  4. Configure Security Group: Click Next: Configure Security Group. This acts as a virtual firewall for your instance.

    • Select Create a new security group.
    • The default rule allows SSH (Port 22). Important Security Tip: You never want to leave Port 22 open to the entire internet (Source 0.0.0.0/0).
    • Change the Source dropdown for the SSH rule to My IP. AWS will automatically detect your current public IP address and lock down access, ensuring only you can attempt to connect to the server.
  5. Review and Launch: Click Review and Launch. If everything looks correct, click Launch.

## Step 3: Generating and Downloading Your Key Pair

When you launch your instance, AWS will prompt you to choose or create a key pair. This key pair is the secure credential that verifies your identity when connecting to the Linux server.

  1. Create a New Key Pair: Select Create a new key pair from the dropdown menu.
  2. Name the Key: Give your key a memorable name, such as darrens-new-key.
  3. Download the Key: Click Download Key Pair. This will save a .pem file to your computer. DO NOT lose this file.
  4. Launch Instance: Once the download is complete, click Launch Instances.

Your instance should now be in the Pending state. Give it a minute or two until the Instance State shows as Running.

## Step 4: Converting the Key for PuTTY (The .pem to .ppk step)

If you are using Windows and PuTTY to connect, you cannot use the .pem file directly. You must convert it into PuTTY’s proprietary .ppk format using PuTTYgen. (You can download PuTTY and PuTTYgen from the official PuTTY website, linked in the video description.)

  1. Open PuTTYgen: Launch the PuTTY Key Generator application.
  2. Load the Key: Click Load. You may need to change the file type dropdown to All Files (*.*) to see your downloaded .pem file. Select darrens-new-key.pem and click Open.
  3. Save Private Key: PuTTYgen will successfully import the key. Click Save private key.
    • Note: It will ask if you want to save it without a passphrase. For a basic test environment, we’ll click Yes. For production environments, always use a passphrase.
  4. Name the PPK: Save the new file with a clear name, such as darrens-test-key.ppk.

You now have the necessary key file to connect.

## Step 5: Connecting to Your Ubuntu Server via PuTTY

With the instance running and the .ppk key converted, it’s time to connect!

  1. Get the Public IP: Go back to the AWS EC2 dashboard, select your running instance, and copy its Public IPv4 Address.
  2. Open PuTTY: Launch the PuTTY client application.
  3. Configure Authentication:
    • In the PuTTY menu on the left, expand SSH.
    • Click on Auth.
    • Click Browse and select the .ppk file you just saved (darrens-test-key.ppk).
  4. Configure Session:
    • Return to the Session category at the top of the menu.
    • Paste the Public IPv4 Address into the Host Name (or IP address) field. Port should remain 22.
  5. Open the Connection: Click Open.
  6. Login: You may receive a security alert (since this is the first time connecting); click Yes to accept the connection.
  7. Enter Credentials: PuTTY will prompt you for a login. Since we are using the official Ubuntu AMI, the default username is: ubuntu

And that’s it! You should now see the Linux command prompt, indicating you are securely connected to your brand-new Ubuntu server running live on AWS.

## Conclusion

Congratulations! You have successfully navigated the entire process of launching, securing, and connecting to an Ubuntu EC2 instance on AWS. This workflow is the foundation for almost any project you’ll undertake in the AWS cloud.

I hope you found this tutorial useful! If you did, please take a moment to hit the Like button and Subscribe to Darren’s Tech Tutorials for more clear, practical technology guides.

If you want to support the channel and help us create even more content, check out the Patreon link in the video description.

Thanks for watching, and happy coding!