Created
August 13, 2018 12:47
-
-
Save lharries/8ceb2474e489dbee4398e959f2f3cbf6 to your computer and use it in GitHub Desktop.
Login to an aws ec2 using the ec2 instance id
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
ssh -i path/to/pem <ec2-instance-username>@`aws ec2 describe-instances --instance-ids <ec2-instance-id> --query 'Reservations[*].Instances[*].PublicIpAddress' --output=text` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment