martes, 29 de noviembre de 2016

python argparse reference

The cleanest example to parse options for a python program:

https://pymotw.com/2/argparse/

miércoles, 16 de noviembre de 2016

Getting AWS instances using certain image-id with CLI


  1. Create a file filters.json
  2. $ aws ec2 describe-instances --filters file://filters.json
The filters.json file looks like this:


[
  {
    "Name": "image-id",
    "Values": ["ami-dc6aa9b1"]
  }
]

Correct fail2ban filter for sshd on Amazon Linux

Fail2ban does not catch the regular expression for Invalid or Illegal ssh logins on Amazon Linux. So far the fix goes like this: Not match...