-
-
Save louiszuckerman/48f06e53f991e672d50e to your computer and use it in GitHub Desktop.
SSH to EC2 host by Instance ID
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 | |
# Usage: essh { instance id } [ subcommand ] | |
ssh -X $(aws ec2 describe-instances --instance-ids $1 --query "Reservations[0].Instances[0].PublicIpAddress" --output text) $2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment