Skip to content

Instantly share code, notes, and snippets.

@shearluck
Created April 29, 2019 03:33
Show Gist options
  • Save shearluck/2f0252817e1daee3e1ad862d679a0c87 to your computer and use it in GitHub Desktop.
Save shearluck/2f0252817e1daee3e1ad862d679a0c87 to your computer and use it in GitHub Desktop.
SSH authorize my IP
MYIP=`curl -s ipinfo.io/ip`
aws ec2 authorize-security-group-ingress --group-id $SG_ID --ip-permissions IpProtocol=tcp,FromPort=22,ToPort=22,IpRanges="[{CidrIp=$MYIP/32}]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment