This is probably a stupidly simple question to some :)
I\'ve created a new linux instance on Amazon EC2, and as part of that downloaded the .pem file to allow me to
Following are the simple steps for Linux user to connect with the server using .pem file:
Step1: To to the location of pem file and copy it to home .ssh location.
cp example.pem ~/.ssh/example.pem
Step2: Change the permission
chmod 400 ~/.ssh/example.pem
Step3: Run the following command
ssh -i ~/.ssh/example.pem ec2-user@host.com
As this command is too long so you sould create the alias of this using following commands:
vim ~/.bashrc
Write the same command in the following manner at the last.
alias sshConnect='ssh -i ~/.ssh/example.pem ec2-user@host.com'
Now restart your system and use sshConnect to connect with your server.