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"

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.