When working in the cloud, one of the key challenges is accessing your EC2 instances to perform maintenance or administrative tasks. This guide will walk you through the different methods available, depending on your operating system.
If you're using Mac or Linux, you can use SSH, a built-in command-line utility, to securely connect to your EC2 instances. This method provides direct access through the terminal without needing additional software.
📌 To use SSH on Mac/Linux:
ssh -i your-key.pem ec2-user@your-ec2-public-ip
Ensure that:
✅ You have the correct private key (.pem file).
✅ The key permissions are set properly (chmod 400 your-key.pem).
✅ The EC2 instance’s security group allows inbound SSH traffic on port 22.
For Windows users running versions older than Windows 10, SSH is not natively available. Instead, you can use Putty, a third-party tool that provides the same SSH functionality.
.pem key to a .ppk format using Puttygen.ec2-user).