I have an Ubuntu Linux server that is web facing. Because of this I get a fair number of brute force SSH attempts (who doesn't). I'd like to display the last N failed login attempts at my login prompt. I've worked out the simple script:
grep "Failed" /var/log/auth.log | tail -5
but what I need to know is where do I put this line of script? Is there somewhere to put it that's shell agnostic?