AWS Solutions Architect · Module 3 · Day 10

Launch & Access a Linux EC2 Instance

⏱ 13 min read🎯 Beginner friendly🖼 1 diagram🧪 3 live demos🐍 Python code

Most servers in the cloud run Linux, so this is the method you will use most. You will launch a Linux instance and log in with SSH, using whichever tool fits your laptop. Then you will learn to fix the four SSH errors every beginner meets.

In this session

  • Linux EC2 at a glance: SSH, port 22, ec2-user/ubuntu
  • Lab: launch a Linux instance
  • Five ways to connect
  • Reading the ssh command
  • Fixing common SSH errors
  • Safer access: Session Manager

01Linux EC2 at a glance

ItemValue
AMIAmazon Linux 2023 or Ubuntu
Usernameec2-user (Amazon Linux, RHEL) · ubuntu (Ubuntu)
ConnectionSSH (Secure Shell), port 22
Login proofyour private key (.pem or .ppk), no password
Users at oncemany users can log in at the same time
📞

SSH is a secure phone line into the server. Instead of a desktop (RDP), you get a text window where you type commands.

Note: every Linux system has a root user, but on EC2 you never log in as root directly. You log in as ec2-user/ubuntu and use sudo (Day 11).

02Lab: launch a Linux instance

Demo · Do it yourself

03Five ways to connect

Demo · Pick your tool
partmeaningsshtoolthe SSH program-i linux-key.pemidentityyour private key fileec2-useruserlogin name for the AMI@atseparator13.233.45.67hostpublic IP or DNS name
Reading the ssh command, part by part.

04Fixing common SSH errors

Demo · What does the error mean?
🎯 Exam corner
  • Linux → SSH, port 22, key pair.
  • No SSH keys, no bastion, audited sessions → Session Manager.
  • Reach an instance in a private subnet without a public IP → Session Manager or EC2 Instance Connect Endpoint.

05Summary

06Quick quiz

1. Default user on Amazon Linux?

2. Correct SSH command?

3. Which format does PuTTY need?

4. “Permission denied (publickey)” usually means…

5. Which service gives shell access with no port 22 and no keys?

07References

Created by Ajeetkumar