Skip to content

Instantly share code, notes, and snippets.

Last active Oct 2, 2019
What would you like to do?
Send Pushbullet notification on SSH connection
access_token=<pushbullet access token> # Get it from your account settings page (
# Get IP, reverse DNS and hostname
reverse=$(dig -x $ip +short)
curl --request POST \
--url \
--header "Access-Token: $access_token" \
--header 'Cache-Control: no-cache' \
--header 'Content-Type: application/json' \
--data "{\"title\": \"New connection on $host\", \"body\": \"$USER connected from $ip ($reverse)\", \"type\": \"note\" }" \
> /dev/null 2>&1 # Redirecting the outputs to make the script silent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment