Skip to main content

SSH

The client has the private key (contained on a .pem file), and the server the public key (a file with the .pub extension, saved at ~/.ssh/authorized_keys). Anyone with the public key can access the instance.

chmod 400 us-east-kp.pem # Fix WARNING: UNPROTECTED PRIVATE KEY FILE!
ssh -i us-east-kp.pem ec2-user@ec2-107-22-100-77.compute-1.amazonaws.com

Close connection: exit

You can generate the public key from the private key at any time with: ssh-keygen -y -f key.pem > key.pub source