Day 10 โ Provisioning and Connecting to an EC2 Ubuntu Instance on AWS (Level 1)

Table of contents
- โ Objective
- ๐งฑ Step-by-Step: EC2 Instance Launch
- ๐ SSH Connection Steps
- โ ๏ธ Issue Faced: SSH Connection Timeout
- ๐ฅ๏ธ Logged Into Ubuntu Server
- ๐ง Key Takeaways
- ๐ญ Engineering isn't about never facing problems. It's about recognizing, debugging, and solving them with precision and calm. Today was exactly that โ a small problem, a real fix, and a deeper understanding.
As part of my journey into AWS and DevOps, todayโs task was to launch an EC2 Ubuntu instance and connect to it securely using SSH. This is a basic but critical building block for deploying cloud-native systems, running automation scripts, or hosting services.
โ Objective
Provision a virtual machine using EC2
Configure networking and key pair for secure access
Connect via SSH
Identify and resolve real-world issues during setup
๐งฑ Step-by-Step: EC2 Instance Launch
From the AWS Management Console:
AMI: Ubuntu Server 24.04 LTS (HVM)
Instance type:
t2.micro
(Free tier eligible)Key Pair: Created new key
ubuntuServer-1.pem
Security Group: Opened port 22 (SSH) for my IP
Storage: Default 8 GB
Launched the instance and verified that it moved into the โRunningโ state.
Instance Running
๐ SSH Connection Steps
AWS provides a one-click SSH instruction under the Connect tab. I followed these instructions:
chmod 400 ubuntuServer-1.pem
ssh -i "ubuntuServer-1.pem" ubuntu@ec2-15-207-177-77.ap-south-1.compute.amazonaws.com
Connection Instructions
โ ๏ธ Issue Faced: SSH Connection Timeout
Initially, I faced an error:
ssh: connect to host ec2-15-207-177-77.ap-south-1.compute.amazonaws.com port 22: Connection timed out
๐ Troubleshooting Process:
โ Verified security group had SSH (port 22) open to my IP โ confirmed โ
โ Checked key permissions using
chmod 400
โ confirmed โโ Validated Public IP in EC2 details โ matched โ
โ Issue: My local firewall had outbound connections blocked on port 22.
๐ ๏ธ Fix:
Temporarily disabled firewall to test.
Once confirmed, added a firewall rule to allow outbound SSH (port 22) connections.
Re-ran the SSH command and successfully connected.
๐ฅ๏ธ Logged Into Ubuntu Server
Once connected, I verified:
OS version: Ubuntu 24.04.2 LTS
System metrics: CPU, memory, and load
Network: Confirmed private IP, public IP, and hostname
๐ธ SSH Terminal
๐ง Key Takeaways
SSH troubleshooting is a practical skill โ cloud engineers often deal with networking/firewall misconfigurations.
Default security group and firewall configurations must be reviewed thoroughly.
AWSโs connection tab offers reliable guidance if used carefully.
Always verify:
Security Group rules
Key permissions
Correct user (
ubuntu
for Ubuntu AMIs)Public DNS/IP match
๐ญ Engineering isn't about never facing problems. It's about recognizing, debugging, and solving them with precision and calm. Today was exactly that โ a small problem, a real fix, and a deeper understanding.
Subscribe to my newsletter
Read articles from Akanksha directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
