Add the SSH login script

This commit is contained in:
purplebored committed 2025-12-24 04:26:07 +01:00
commit 9a428a18f0
1 file changed
+20
+20
View File
@@ -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"