sshd-discord-webhook/README.md

27 lines
759 B
Markdown
Raw Permalink Normal View History

2021-05-10 13:28:27 +00:00
# sshd-discord-webhook
2021-05-10 13:32:56 +00:00
keeping this here so i dont forget how i did it. stolen and modified from https://danirod.es/blog/2017/receive-sshd-login-notifications
# how do
1) Add the following to `/etc/pam.d/sshd`:
```
session optional pam_exec.so /usr/local/sbin/sshd-login
```
2) Copy `sshd-login.sh` to `/usr/local/sbin/sshd-login` (without extension) and replace the placeholder webhook URL with a working one
2021-05-10 13:36:20 +00:00
```
sudo sh -c "curl https://gitea.janderedev.xyz/Jan/sshd-discord-webhook/raw/branch/master/sshd-login.sh > /usr/local/sbin/sshd-login"
```
2021-05-10 13:37:40 +00:00
3) pray that it works
4) it probably doesn't
5) `chmod +x /usr/local/sbin/sshd-login`
2021-05-10 13:52:12 +00:00
6) now it should work
7) if it still doesn't work, consider sacrificing your first newborn child to stallman