This script uses AWS CLI to add or remove a public IP from a Security Group's inbound rules.
- This script requires
jq
to be installed. On Ubuntu, you can install this withsudo apt install jq
. - This script also requires a valid AWS CLI Credentials file:
~/.aws/credentials
To run the script, mark it as executable and run it:
chmod +x ./ec2-ssh-ingress.sh
./ec2-ssh-ingress.sh