Skip to content

Instantly share code, notes, and snippets.

Jared Hendry jaredh

Block or report user

Report or block jaredh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jaredh
jaredh / pam-pushover.sh
Created Feb 21, 2016
Script for notifying Pushover of successful SSH logins
View pam-pushover.sh
#!/bin/sh
PUSHOVER_API_URL="https://api.pushover.net/1/messages.json"
PUSHOVER_APPTOKEN="<YOUR_APP_TOKEN>"
PUSHOVER_USERKEY="<YOUR_USER_KEY>"
if [ "$PAM_TYPE" != "close_session" ]; then
MESSAGE="User '$PAM_USER' logged into '`hostname`' from IP address '$PAM_RHOST'"
curl -s -F "user=$PUSHOVER_USERKEY" -F "token=$PUSHOVER_APPTOKEN" -F "message=$MESSAGE" $PUSHOVER_API_URL
You can’t perform that action at this time.