- Add notify.sh to some place
- Change
tokenandchat_idvalues (you can getchat_id, e.g. by writing to bot and requestinggetUpdates) chmod +x /path/to/notify.shecho "session optional pam_exec.so seteuid /path/to/notify.sh" >> /etc/pam.d/sshd
You can change optional to required if you sure that everything works