Created
June 22, 2023 18:45
-
-
Save fiftin/0ea0d1a7a5e808aaa968dbd33184cffe 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
#/bin/bash | |
ip_address=$(dig $1 +short) | |
instance_id=$(aws ec2 describe-instances --filters Name=private-ip-address,Values=${ip_address} --output text --query 'Reservations[*].Instances[*].{Instance:InstanceId}') | |
mssh ubuntu@${instance_id} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment