Send email out on SSH login


/ Published in: Bash
Save to your folder(s)

Put this in /etc/profile


Copy this code and paste it in your HTML
  1. echo "`whoami` has logged in on `date` from "$SSH_CONNECTION | /usr/bin/mail -s "Server Login" email@server.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.