Created
October 11, 2016 08:43
-
-
Save wikrie/d39bb7b193f7abe4f84b405d34ef99d2 to your computer and use it in GitHub Desktop.
Send Notification if User login via SSH
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 | |
#echo "Login detected at $(hostname) / $(date +%d.%m.%Y) $(date +%H:%M:%S)" | |
#FROM=`echo $SSH_CONNECTION | awk '{ print $1 }'` | |
#echo "Benutzer: $USER@$FROM" | |
#echo | |
#echo -n "Uptime: " | |
#uptime | |
#echo | |
#echo "Last Login Activity: " | |
#last | |
#echo | |
#echo "Logged in Users: " | |
#finger | |
echo "Login auf $(hostname) am $(date +%Y-%m-%d) um $(date +%H:%M)" | |
echo "Benutzer: $USER" | |
echo | |
finger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment