Skip to content

Instantly share code, notes, and snippets.

@MattHealy
Created January 12, 2022 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattHealy/b88c5f79f2020eb8c61f52e1bd41c699 to your computer and use it in GitHub Desktop.
Save MattHealy/b88c5f79f2020eb8c61f52e1bd41c699 to your computer and use it in GitHub Desktop.
Get IP address and SSH
#!/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