Created
September 3, 2021 19:08
-
-
Save tamr/512aa47ee7278ed1d5c07002d6d6b51a to your computer and use it in GitHub Desktop.
/etc/ssh/sshrc
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
#!/bin/bash | |
ip=`echo $SSH_CONNECTION | cut -d " " -f 1` | |
server_ip=`echo $SSH_CONNECTION | cut -d " " -f 3` | |
#server_ip="$(wget -qO- checkip.amazonaws.com)" | |
wget -qO /dev/null --delete-after --no-check-certificate "https://push.re/message?token=AppToken" --post-data "title=SSH+Login+on+$server_ip&message=User+$USER+just+logged+in+from+https://ipapi.co/$ip&priority=5" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment