Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # get an email every time a user logs in through ssh
- # www.fduran.com
- # add in /etc/profile
- echo "`whoami` logged in at `date` from `echo $SSH_CLIENT`" | mail -s "`hostname` login" youremail@example.com
- # note this is not fool-proof. For example the user can run remotely a command thru ssh without logging in
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement