Skip to content

Instantly share code, notes, and snippets.

@mpezzi
Created May 3, 2012 22:36
Show Gist options
  • 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