Created
June 4, 2015 05:28
-
-
Save elliot/02444dd384b631c45545 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
aws ec2 describe-instances --filters --output json \ | |
'Name=instance-state-name,Values=running' \ | |
'Name=tag:Name,Values=SSHBastion' \ | |
'Name=tag:Subnet,Values=public' \ | |
| jq -r '.Reservations[].Instances[].PublicDnsName |
This file contains hidden or 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
Host *.aws.example.com | |
ProxyCommand ssh -A ec2-user@`aws ec2 describe-instances --filters "Name=instance-state-name,Values=running" "Name=tag:Name,Values=SSHBastion" "Name=tag:Subnet,Values=public" | jq -r .Reservations[].Instances[].PublicDnsName` -W %h:%p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment