From 23c8b588a93e1997da7f03a93dae453ff8b89d61 Mon Sep 17 00:00:00 2001 From: Peter Wood Date: Thu, 31 Aug 2023 19:52:47 -0400 Subject: [PATCH] alert when there is a login via ssh --- ssh-login.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 ssh-login.sh diff --git a/ssh-login.sh b/ssh-login.sh new file mode 100755 index 0000000..4d067ea --- /dev/null +++ b/ssh-login.sh @@ -0,0 +1,8 @@ +#!/bin/bash +if [ "${PAM_TYPE}" = "open_session" ]; then + curl \ + -H prio:high \ + -H tags:warning \ + -d "SSH login: ${PAM_USER} from ${PAM_RHOST}" \ + https://notify.peterwood.rocks/lab +fi