This guide shows a simple way to know when someone logged in as root or normal user using [[Key-Based SSHLogins|Secure Shell (SSH)]].  It will send an email alert notification to the specified email address along with the IP address of last login.
* [[Open_Terminal|As root user]] create ''ssh_email_alert.sh'' with the following text:
 ssh_email_alert.sh
You should not get an email anytime a user logs into your HDA via [[Key-Based SSH Logins|Secure Shell(SSH)]].
Reference:  [http://linux.alanstudio.hk/ssh_emailalert.htm Email Alert for SSH login]