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!

Mail alert when someone logs into your SSH

Discussion in 'E-mail Discussion' started by d4rkl0rd, Jul 10, 2004.

  1. d4rkl0rd

    d4rkl0rd Active Member

    Joined:
    Feb 23, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    India
    vi /root/.bash_profile

    echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" you@yourdomain.com

    or

    echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | awk '{print $6}'`" youremail@yourmailaddress.com

    Make sure that the e-mail address you use is not hosted on the server

    Andrew Arumaithambi :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 d4rkl0rd, Jul 10, 2004
    Last edited: Dec 22, 2004
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