Last active
August 2, 2017 18:31
-
-
Save vitoo/8da59382a1565282ed55e78637a6a2f5 to your computer and use it in GitHub Desktop.
Send discord webhook at ssh login (every user)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/ssh/sshrc | |
ip=`echo $SSH_CONNECTION | cut -d " " -f 1` | |
curl --silent -v \ | |
-H "Content-Type: application/json" \ | |
-X POST \ | |
-d "{\"content\":\"new login $USER $ip \"}" \ | |
https://discordapp.com/api/webhooks/_WEBOOK_URL > /dev/null 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment