Q: You launched an EC2 instance but can't SSH into it. What do you check?
1. Security Group — does inbound rule allow port 22 from your IP? Check in the EC2 console under Security Groups.
#AWS #EC2 & Compute #L1 #Cloud #Infrastructure #EC2
🎙️ Candidate Opening & Architectural Context
""In our AWS cloud environment, we managed high-traffic microservices where this exact scenario occurred. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Initial Diagnostics & Root Cause Analysis
- Security Group — does inbound rule allow port 22 from your IP? Check in the EC2 console under Security Groups.
- Key pair — are you using the correct
.pemfile? Is it the right one for that instance? - File permissions —
chmod 400 key.pem. SSH won't work if key permissions are too open. - Instance state — is it running? Not stopped or pending?
2️⃣
Remediation & Permanent Safeguards
Execute the resolution runbook and verify workload health:
- Public IP — does it have a public IP or Elastic IP assigned?
- VPC/Subnet — is it in a public subnet with an Internet Gateway? A private subnet instance can't be SSH'd from internet.
- NACL — Network ACLs can block traffic even if Security Groups allow it. NACLs are stateless.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Security Group — does inbound rule allow port 22 from your IP? Check in the EC2 console under Security Groups.."
⚡ 60-Second Elevator Pitch Talking Points
- Security Group — does inbound rule allow port 22 from your IP? Check in the EC2 console under Sec...
- Key pair — are you using the correct .pem file? Is it the right one for that instance?
- File permissions — chmod 400 key.pem. SSH won't work if key permissions are too open.
Advertisement