commit 9a428a18f0cbbc24cb07acebbdd7429df322aab29adf3a588c1754d430e44db0 Author: ~purplebored Date: Wed Dec 24 04:26:07 2025 +0100 Add the SSH login script diff --git a/ssh-login-ntfy.sh b/ssh-login-ntfy.sh new file mode 100644 index 0000000..4060f50 --- /dev/null +++ b/ssh-login-ntfy.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Your ntfy topic URL +NTFY_TOPIC="bla bla bla" + +HOSTNAME=$(hostname) +USER="$PAM_USER" +IP="$PAM_RHOST" +TIME=$(date +"%Y-%m-%d %H:%M:%S %Z") + +MESSAGE="SSH login +User: $USER +IP: $IP +Host: $HOSTNAME +Time: $TIME" + +curl -s -X POST "$NTFY_TOPIC" \ + -H "Title: New SSH Login detected !" \ + -H "Priority: 4" \ + -d "$MESSAGE"