16 lines
411 B
Bash
16 lines
411 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# Récupérer les variables d'environnement
|
||
|
USER=$PAM_USER
|
||
|
HOST=$PAM_RHOST
|
||
|
IPADDR=$PAM_RHOSTADDR
|
||
|
SESSION=$PAM_TTY
|
||
|
|
||
|
# Envoyer une notification via ntfy.sh (remplacer "your_topic" par votre sujet ntfy)
|
||
|
curl -X POST https://ntfy.sh/your_topic \
|
||
|
-d '{
|
||
|
"title": "Connexion SSH",
|
||
|
"message": "Utilisateur '$USER' connecté depuis '$HOST' ($IPADDR) - Session: '$SESSION'",
|
||
|
"priority": 1
|
||
|
}'
|