Skip to content

Instantly share code, notes, and snippets.

@mpezzi
Created May 3, 2012 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpezzi/2590060 to your computer and use it in GitHub Desktop.
Save mpezzi/2590060 to your computer and use it in GitHub Desktop.
Amazon AWS EC2 SSH Helper
#!/bin/bash
AWS_KEY=""
AWS_SECRET=""
if [ $# -ne 1 ]
then
ec2-host --aws-key $AWS_KEY --aws-secret $AWS_SECRET
else
ssh -i ~/.ssh/key.pem ec2-user@$(ec2-host --aws-key $AWS_KEY --aws-secret $AWS_SECRET $1)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment