πŸš€ How to SSH into an AWS EC2 Instance (Quick Guide)

AWS AZURE LINUX

Want to connect to your AWS EC2 server using SSH? Follow these quick steps!


βœ… Prerequisites

  • βœ… A running EC2 instance
  • βœ… .pem key file (downloaded from AWS)
  • βœ… Public IP of your instance
  • βœ… Terminal (macOS/Linux) or PuTTY (Windows)

πŸ› οΈ Steps

1. Set permissions on your key file

chmod 400 your-key.pem

2. SSH into your EC2 instance

For Amazon Linux:

ssh -i your-key.pem ec2-user@your-ec2-ip

For Ubuntu:

ssh -i your-key.pem ubuntu@your-ec2-ip

Replace your-key.pem with your key file and your-ec2-ip with the public IP of your instance.


πŸ”§ Common Issues

  • ❌ Permission denied: Check the username and permissions of your key file
  • πŸ”₯ Timeout: Ensure port 22 is open in your Security Group

πŸ”’ Quick Tips

  • πŸ” Keep your .pem file private
  • πŸ“΅ Don’t share your key with anyone
  • 🧠 Connect only from trusted devices

That’s it! You’re now connected to your EC2 instance πŸŽ‰
Simple, secure, and powerful.

Leave a Reply

Your email address will not be published. Required fields are marked *