Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Shell login notifications

Discussion in 'Security' started by ScottIsMyName, Jun 6, 2019.

  1. ScottIsMyName

    ScottIsMyName Member

    Joined:
    Feb 27, 2019
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Diego
    cPanel Access Level:
    Root Administrator
    I see there are options for notifications when someone logs in via cPanel, but what is the best way to setup notifications for ssh/sftp access?
     
  2. Tyson Vane

    Tyson Vane Registered

    Joined:
    May 9, 2019
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Edapally, Kochi, Kerala
    cPanel Access Level:
    Root Administrator
    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
    [email protected]” 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`” [email protected]
     
  3. ScottIsMyName

    ScottIsMyName Member

    Joined:
    Feb 27, 2019
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Diego
    cPanel Access Level:
    Root Administrator
    Thanks, I did see this, but I want it for all users, not just root logins (which I have disabled anyway)
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,534
    Likes Received:
    2,181
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. ScottIsMyName

    ScottIsMyName Member

    Joined:
    Feb 27, 2019
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Diego
    cPanel Access Level:
    Root Administrator
    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
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,534
    Likes Received:
    2,181
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice