Comments on: How to Get Root and User SSH Login Email Alerts https://www.tecmint.com/get-root-ssh-login-email-alerts-in-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Tue, 11 Jun 2024 10:36:10 +0000 hourly 1 By: ginés https://www.tecmint.com/get-root-ssh-login-email-alerts-in-linux/comment-page-1/#comment-2179434 Tue, 11 Jun 2024 10:36:10 +0000 http://www.tecmint.com/?p=4884#comment-2179434 It would be better to put this line in the .profile or .bash_login files since they are only executed at login (i.e., only one time), while .bashrc is executed every time a subshell is launched (likely, many times).

]]>
By: Ravi Saive https://www.tecmint.com/get-root-ssh-login-email-alerts-in-linux/comment-page-1/#comment-1178887 Mon, 24 Jun 2019 05:29:56 +0000 http://www.tecmint.com/?p=4884#comment-1178887 In reply to Pandurang Khot.

@Pandurang,

Check this article..

How to Get Root and User SSH Login Email Alerts

]]>
By: Pandurang Khot https://www.tecmint.com/get-root-ssh-login-email-alerts-in-linux/comment-page-1/#comment-1176499 Thu, 20 Jun 2019 12:29:03 +0000 http://www.tecmint.com/?p=4884#comment-1176499 Create a alert on my server such that if anyone other than my and my manager IP’s login to the server we should get an mail based alert with the user ID & ip address.

Please help.

]]>
By: vikash khanna https://www.tecmint.com/get-root-ssh-login-email-alerts-in-linux/comment-page-1/#comment-1045845 Tue, 09 Oct 2018 11:54:25 +0000 http://www.tecmint.com/?p=4884#comment-1045845 Thanks a ton, after implementing I am able to get root SSH login email alerts..

]]>
By: Tony https://www.tecmint.com/get-root-ssh-login-email-alerts-in-linux/comment-page-1/#comment-967707 Thu, 08 Feb 2018 14:16:25 +0000 http://www.tecmint.com/?p=4884#comment-967707 Hi, I just tested this on my Linux box and it works well. However, if i need to reverse the script, how do i achieve that?

echo ‘ALERT – Root Shell Access (ServerName) on:’ `date` `who` | mail -s “Alert: Root Access from `who | cut -d'(‘ -f2 | cut -d’)’ -f1`” xxxx@xxxx.com

]]>