It took me a few minutes to find this information so I am documenting here how to accomplish this:
- Download the .pem file.
- Place it in a folder and note where you stored it.
- Open Terminal.
- using cd go to the folder where your .pem file is stored. EX. cd /Home/User/Desktop
- Amazon requires that the private key privileges be set to 400.
- Using chmod set the privileges for 400. EX. chmod 400 test.pem
- To access using SSH type: ssh -i test.pem email@example.com
- Type in: Yes
- That’s it!
Note: You can make simplify frequent connections by placing this in a .sh script.
- Create a text file.
- Paste your original command: ssh -i /Home/User/Desktop/test.pem firstname.lastname@example.org
- Save the text file with the extention .sh
- Now you can go to the directory with .sh and type: bash filename.sh