server-scripts/notify-login.sh

6 lines
196 B
Bash
Raw Normal View History

2022-06-05 11:20:56 +02:00
#!/bin/sh
if [ "$PAM_TYPE" != "close_session" ]; then
echo -e "$PAM_USER has successfully logged in on $(hostname) from $PAM_RHOST" | $(dirname $0)/mail.sh "$(hostname) SSH Login: $PAM_USER"
fi