Return to Snippet

Revision: 15939
at July 21, 2009 09:28 by arnoldb


Initial Code
echo ‘[SSH] – SSH access to SERVERNAME on:’ `date` `who` | mail -s “SSH access from `who | cut -d”(” -f2 | cut -d”)” -f1`” [email protected]

Initial URL
http://www.arnoldb.com/2009/06/05/keep-an-eye-on-your-ssh-access/

Initial Description
Simply change the email address and add this to the bottom of your .bashrc file in your home directory. You may also want to add this to the .bashrc in the /root directory, and the .profile in /etc to ensure you are notified anytime your server is accessed via SSH.

Initial Title
SSH Access Email Alert

Initial Tags
Bash, ssh

Initial Language
Bash