Skip to content

Instantly share code, notes, and snippets.

@nhammond101
nhammond101 / pippa.sh
Last active November 15, 2019 09:20
Add current IP to AWS EC2 security group for SSH Access using Docker
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}]"