Skip to content

Instantly share code, notes, and snippets.



Created Jul 23, 2019
What would you like to do?
SSH into an EC2 instance using a key file
# Usage:
# ec2 <ip/hostname>
ec2 () {
ssh -i ~/keys/mykey.pem ec2-user@${1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment