Curious to know when a user logs into your server successfully via SSH? Using Pushover notifications you can have something like this.
Fortunately, tying together PAM and Pushover is painless.
Next, grab this small script and place it somewhere on the server. I put mine here, /etc/ssh/pam-pushover.sh. Edit the script and insert your API token and user key like so,
Make sure the script is executable
chmod +x /etc/ssh/pam-pushover.sh
Add the following line to /etc/pam.d/sshd
# Notify Pushover on successful login
session optional pam_exec.so seteuid /etc/ssh/pam-pushover.sh
Upon next successful login your Pushover client should be greeted with a nice notification. Also, since this is a PAM configuration, with minimal modification you could extend this to samba, sudo, etc.
Thank you, your comment successfully submitted
your comment has been submited, it might take a while to be moderated.