SSH to AWS, Quick and dirty

SSH to AWS, Quick and dirty
Photo by Taylor Vick / Unsplash

So, you've got your EC2 instance up and running? Lets SSH into it.When you were creating your EC2 instance you should have downloaded a file called something.pem . This is the ssh key you will use.Place your somthing.pem file in your .ssh folder by copying/moving it from your downloads. Then set the correct permissions. In OSX this would be something like this:

  1. open terminal
  2. cp Downloads/somthing.pem .ssh/
  3. chmod 0600 .ssh/somthing.pem

Now, if you go ahead and try and ssh into your EC2 you will get an error. Why? Becouse you're not using the file you just copied over. Add -i somthing.pem.For example: ssh -i App1.pem [email protected]