Created
January 26, 2017 22:23
-
-
Save icedraco/0109f8d6b540821e84453f06dfc59e68 to your computer and use it in GitHub Desktop.
SSHRC file to notify via telegram script of a new login
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
#!/bin/bash | |
# /etc/ssh/sshrc | |
TELEGRAM=$HOME/bin/telegram | |
HOST=$(hostname) | |
DATE=$(date) | |
MSG="SSH Login: *$USER@$HOST* | |
Conn: *$SSH_CONNECTION* | |
Date: $DATE" | |
$TELEGRAM "$MSG" & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment