Last active
August 11, 2020 21:41
-
-
Save vonthecreator/703d4c047b173c824e353ebac40946fb to your computer and use it in GitHub Desktop.
Sends and email with local host IP & SSH port when a WIFI connection is established.
This file contains hidden or 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
SERVER_PORT=$(head -n13 /etc/ssh/sshd_config | grep "Port" | awk '{print $2}') | |
SERVER_IP=$(hostname -I | awk '{ print $1 }') | |
swaks --to [email protected] -s smtp.gmail.com:587 -tls -au [email protected] -ap PASSWORD --header "Subject: [PING] raspy $(date)" --body "IP: $SERVER_IP \nPORT: $SERVER_PORT" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment