SSH Login Notification
Someone might say I’m paranoid but i like to now when someone logs into my server.
Copy this into the file “/etc/ssh/sshrc” (Ubuntu/Debian) and change “email@example.com” to your email address:
IP="$(echo $SSH_CONNECTION | cut -d " " -f 1)" HOST=$(hostname) echo ''$IP' logged into '$HOST'' | mutt -s 'SSH Login' firstname.lastname@example.org
This example only works if you have configured the Mutt email client.