Created
May 3, 2012 22:36
-
-
Save mpezzi/2590060 to your computer and use it in GitHub Desktop.
Amazon AWS EC2 SSH Helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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