SSHing into Go Servers
Command
ssh -i thePEMfile.pem ec2-user@servername.com
To automatically select appropriate PEM file, configue ~/.ssh/config
Configure ~/.ssh/config (needed for deployment script to perform command line tasks on AWS instance)
Host ec2-50-112-42-202.us-west-2.compute.amazonaws.com
Hostname ec2-50-112-42-202.us-west-2.compute.amazonaws.com
User ec2-user
IdentityFile "path/to/openmrs-infrastructure-us_west.pem"
Host ec2-54-245-143-28.us-west-2.compute.amazonaws.com
Hostname ec2-54-245-143-28.us-west-2.compute.amazonaws.com
User ec2-user
IdentityFile "path/to/openmrs-infrastructure-us_west.pem"
Host ec2-54-245-1-154.us-west-2.compute.amazonaws.com
Hostname ec2-54-245-1-154.us-west-2.compute.amazonaws.com
User ec2-user
IdentityFile "path/to/openmrs-infrastructure-us_west.pem"
For Windows
Load .PEM file into PuTTY Key Generator (PuTTYGen) > Save private key as a *.ppk
Loading the *.ppk in Connection > SSH > Auth > Private key file for authentication
Â