Skip to content

Instantly share code, notes, and snippets.

@upbeta01
Last active July 21, 2016 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save upbeta01/47ea1891a290a341ded89e93829db2c2 to your computer and use it in GitHub Desktop.
Save upbeta01/47ea1891a290a341ded89e93829db2c2 to your computer and use it in GitHub Desktop.
aws ec2 describe-security-groups --filters "Name=ip-permission.from-port,Values=22" "Name=ip-permission.to-port,Values=22" --query 'SecurityGroups[*].{Name:GroupName,ID:GroupId,IP:IpPermissions}' --output table
----- THIS SHOWS ALL SECGROUPS (but not limited to port 22) -----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment