- Add notify.sh to some place
- Change
token
andchat_id
values (you can getchat_id
, e.g. by writing to bot and requestinggetUpdates
) chmod +x /path/to/notify.sh
echo "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