Email successful SSH Login

In case if you want to send an warning email to user or admin once the user successfully logged in through SSH, the script below can be added to “/etc/profile”. This file is loaded on users login.