Created
August 21, 2012 06:04
-
-
Save taksatou/3412524 to your computer and use it in GitHub Desktop.
ssh-aws
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
function ssh-aws() { | |
KEY=$1 | |
NAME=$2 | |
if which list_instances >/dev/null; then | |
CMD="ssh -i $KEY root@`list_instances $* -H T:Name,Hostname | awk '{ if ("'$NAME'"==¥$1) print ¥$2}'`" | |
echo $CMD | |
sh -c $CMD | |
else | |
echo please install boto; | |
return 1; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment