OK, someone set you up a EC2 instance and now you need to get access to it.
Requirements:
- the EC2 private key (here it will be called key.pem)
- a terminal (though you can use some SSH client, I am just talking about an UNIX terminal here)
- your machine IP (here it will be 79.123.321.1)
Do the following:
1. Download your key to ~/Downloads
2. Open the Terminal
3. Go to your ssh directory $cd ~/.ssh/
4. Copy your key $cp ~/Downloads/key.pem .
5. Tight up permissions $chmod 400 key.pem
6. Test it $ssh ubuntu@79.123.321.1 -i ~/.ssh/key.pem -vvv
6.1 -i will set the path, -vvv sets verbose mode
7. Edit your config file to avoid doing -i ~/.ssh/key.pem all the time
$vim ~/.ssh/config
paste and edit this text
Host 79.123.321.1
IdentityFile ~/.ssh/key.pem
8. Access your EC2 from anywhere in your machine with
$ssh ubuntu@79.123.321.1