Skip to main content

Shell login notifications

Comments

5 comments

  • Tyson Vane
    To enable SSH login Email Alert 1 : Login to the server as "root" user. #vi /root/.bashrc Step 2 : Add the following line at the bottom of file after replacing the "ServerName" and "your@yourdomain.com" with actual values. echo "ALERT " Root Shell Access (ServerName) on:" `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(" -f2 | cut -d")" -f1`" your@yourdomain.com
    0
  • ScottIsMyName
    Thanks, I did see this, but I want it for all users, not just root logins (which I have disabled anyway)
    0
  • cPanelMichael
    Hello @ScottIsMyName, You could use a third-party application such as CSF: ConfigServer Security & Firewall (csf) It includes an option named LF_SSH_EMAIL_ALERT to enable alerts upon all SSH logins. You can read about how to use and configure this option at:
    0
  • ScottIsMyName
    Thank you, this is working nicely! Is there a way to also receive pushbullet notifications for certain actions? I tried a bit of googling but don't see any support for pushbullet notifications with CSF/LFD
    0
  • cPanelMichael
    Thank you, this is working nicely! Is there a way to also receive pushbullet notifications for certain actions? I tried a bit of googling but don't see any support for pushbullet notifications with CSF/LFD

    Not that I'm aware of, but you can always post on their forums to see if any other users have implemented third-party solutions for PushBullet CSF notifications: ConfigServer Community Forum - Index page Thank you.
    0

Please sign in to leave a comment.