#!/bin/bash failed=`cat /var/log/secure|grep "Failed"|awk '{print $11}'|sort|uniq -c|awk '$1>10 {print $2}'` echo "sshd: $ip">>/etc/hosts.deny