If you want to send email on login, add in &#x2F;etc&#x2F;profile :<p>echo &quot;`whoami` logged in at `date` from `echo $SSH_CLIENT`&quot; | mail -s &quot;`hostname` login&quot; youremail@example.com<p>Note that people can still ssh execute remotely etc.