Created
January 12, 2022 01:40
-
-
Save MattHealy/b88c5f79f2020eb8c61f52e1bd41c699 to your computer and use it in GitHub Desktop.
Get IP address and SSH
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
#!/bin/bash | |
ADDRESS=`aws ec2 describe-instances --filters 'Name=tag:Name,Values=WebServer' --output text --query 'Reservations[*].Instances[*].PrivateIpAddress'` | |
ssh ec2-user@$ADDRESS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment