Last active
November 15, 2019 09:20
-
-
Save nhammond101/3d11d3e3ee3cd88f7f0b4435e424343a to your computer and use it in GitHub Desktop.
Add current IP to AWS EC2 security group for SSH Access using Docker
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
docker run --rm -it -v ~/.aws:/root/.aws waracle/aws-cli \ | |
aws ec2 \ | |
--profile default \ | |
authorize-security-group-ingress \ | |
--group-id sg-123456780abcdef \ | |
--ip-permissions "FromPort=22,ToPort=22,IpProtocol=tcp,IpRanges=[{CidrIp=$(curl -s https://canihazip.com/s)/32,Description=RoamingIp}]" |
Yes, i did spend most of my time thinking of a clever acronym. Pippa stands for Push IP to Aws. I know there's 2 Ps, but it's early
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.