This is a simple slackbot to post successful SSH logins to a slack channel to help you keep track of server access.
Create an incoming webhook for your slack community.
Create /etc/ssh/sshslack.sh
Copy sshslack.sh code and replace URL with webhook URL.
Add the following line to /etc/pam.d/sshd
:
session optional pam_exec.so seteuid /etc/ssh/sshslack.sh
I gets a failed: exit code 13. How does one fix this?