With discord it is even a little easier. You have to create an integration webhook and set it to your desired channel and then put a curl command: like this: curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"Some sample message\"}" discord.com/api/webhooks/your-webhook-id
@@techwithmarco Thank you for the snippet, I wish I was here again to see your comment rather than goggling xD, I was using the same Curl command, and At last it was the `session required` thing If I changed it to `session optional`, Now it works flawlessly
Ah good to know! Then something with your PAM chain might not be right. I am not that deep into how these modules exactly work, but it might be worth for you to check if there are some custom settings done
Head over to my github to find the code snippet :)
github.com/marcogreiveldinger/videos/tree/main/ssh-login-alerts
Thanks for this.
Hey, this is awesome! Thanks a bunch, it works like a charm! 👍
Glad that I could help :)
Thank you for the video, I didn't know this was possible, I tried it for discord but the PAM fails while login, yet the bash script executes good
With discord it is even a little easier. You have to create an integration webhook and set it to your desired channel and then put a curl command:
like this:
curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"Some sample message\"}" discord.com/api/webhooks/your-webhook-id
And maybe you can check the logs of the pam modules and see why it did not work?
@@techwithmarco Thank you for the snippet, I wish I was here again to see your comment rather than goggling xD, I was using the same Curl command, and At last it was the `session required` thing If I changed it to `session optional`, Now it works flawlessly
Ah good to know! Then something with your PAM chain might not be right. I am not that deep into how these modules exactly work, but it might be worth for you to check if there are some custom settings done