Skip to content

Instantly share code, notes, and snippets.

@tmosest
Created September 14, 2016 02:35
Show Gist options
  • Save tmosest/706b748dae6816909fab7efe4bc2a8ee to your computer and use it in GitHub Desktop.
Save tmosest/706b748dae6816909fab7efe4bc2a8ee to your computer and use it in GitHub Desktop.
AWS EC2: Connecting To An Instance.
To open an AWS Instance you:
==========================
Windows Computers
==========================
1) Open Git Bash to the folder that contains my .pem file that you generated with your instance
2) Using Git command prompt you use chmod 400 my.pem to set the correct permissions on my.pem file
3) You then type in “ssh –v –i my.pem ec2-user@my-instance-dns” into Git command prompt to connect
==========================
Mac
==========================
1) Open Terminal
2) Use the cd command to move to the appropriate folder.
3) Type the following command to change the pem key permissions:
> chmod 400 my.pem
4) Connect using:
> ssh –v –i my.pem ec2-user@my-instance-dns
@NoSubstitute
Copy link

@Yash-shetty the errors you are seeing indicate that your IP isn't actually accessible from the outside. You need to fix that first.
It's probably done in some section that manages the firewall.

I haven't ever used AWS. I just used these same instructions to connect to SSH in Google Cloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment