The first permission to change the pem file to
chmod 400 path/to/key_pair.pem
Inside the ~ / .ssh / config file, add the following lines at the top of the file
Host AWS Hostname myserver.com User myuser IdentityFile path/to/.pem/file port 22
The host name accepts the IP or server link, the user accepts the username and the Identity file is the file downloaded from AWS when the instance was created. Just run the following command in terminal
ssh AWS
and enjoy!
Note To go to the .ssh folder. First press Ctrl + H in the home folder to display all hidden files and finally cd .ssh
Vineet Jain Aug 16 '17 at 7:36 on 2017-08-16 07:36
source share