Email Alert for SSH login

Step 1

Please ensure your sendmail SMTP service is running that it can use the command 'mail'

[root@local~]# cd /usr/local/bin
[root@local~]# wget
[root@local~]# chmod 755 /usr/local/bin/
[root@local~]# vi /usr/local/bin/

Download my script to /usr/loca/bin and edit the file to change the alert email address.

Step 2

[root@local~]# vi /etc/bashrc

## Email Alert for All User SSH login

Add the sh mand in the end of file of /etc/bashrc for all user's ssh login


[root@local~]# vi /root/.bash_profile

## Email Alert for Root SSH login

Add the sh command in the end of file of /root/.bash_profile for root ssh login only

Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.