自分以外がログインしていないか不安になるアレ、解決します

# mkdir -p /etc/ssh/scripts
#!/bin/sh

url="https://talk.example.com/hooks/testTEST123123"
channel="#ssh-alert"

if [ "$PAM_TYPE" != "close_session" ]; then
    host=$(curl icanhazptr.com)
    content="\"text\": \"Someone Logged Into \`$host\`\n
|User|IP Addr.|
|----|----|
|$PAM_USER|[$PAM_RHOST](https://ipinfo.io/$PAM_RHOST)|\""

    curl -i -X POST --data-urlencode "payload={$content}" $url
fi
/etc/ssh/scripts/notify.sh
# chmod 700 /etc/ssh/scripts/notify.sh
# echo "# Notify script" >> /etc/pam.d/sshd
# echo "session optional pam_exec.so seteuid /etc/ssh/scripts/notify.sh" >> /etc/pam.d/sshd