Here’s how to add your .pem keyfile to your $KNOWN_HOSTS so that you never have to rely on being in the correct directory in order to get to AWS with SSH.

Move your .pem from Downloads to ~/.ssh:

mv keyfile.pem ~/.ssh

Then type:

ssh-add ~/.ssh/keyfile.pem

And now you’re able to easily connect without that long “-i filename” blah blah blah command. Just type:

ssh <<username>>@<<ec2-dns-info>>.amazonaws.com