Slide

  • LINUX

    LINUX:In 1969 AT&T made a decision to withdraw Multics and go with GECOS (General Electric Comprehensive Operating Supervisor / System), with AT & T in Bells Lab when Multics was withdrawn some of the programmers named Ken Thompson and Dennis Ritchie decided to rewrite operating system in order to support low cost computer..To Know More

    CLICK HERE

  • MICROSOFT

    MICROSOFT:Microsoft was established to develop and sell BASIC interpreters for the Altair 8800. It rose to dominate the home computer operating system market with MS-DOS in the mid-1980s,followed by the Microsoft Windows line of operating systems. To Know More

    CLICK HERE

  • CISCO

    CISCO:During the early 1980s, there was a married couple namely Len and Sandy Bosack who used to work in two different departments of computer located in Stanford University. This couple was facing problem in making their computers communicate with each other To Know More

    CLICK HERE

showinfo=1

SSH login alert via email




SSH login alert via email


So lets get started!

1. Login to your server and su to root,

2. cd  /root

3. vi .bashrc

4. Scroll to the end of the file then add the following:
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

Replace YourServerName with the handle for your actual server
Replace you@yourdomain.com with your actual email address

5. Save and Exit the File


6. Give Excute Permission (Check file permission section  Click Here )

Now logout of SSH, close the connection and log back in! You should receive an email address of the root login alert a few minutes afterwards.

17 comments:

  1. when done perform these steps i got the following error,

    /usr/sbin/sendmail: No such file or directory
    "/root/dead.letter" 9/362
    . . . message not sent.

    Please help to sort this out.

    ReplyDelete
  2. when i perform these steps i got the following error,

    /usr/sbin/sendmail: No such file or directory
    "/root/dead.letter" 9/362
    . . . message not sent.

    Please help to sort this out.

    ReplyDelete
  3. you need to configure mailing on the server else how will server send the mail
    postfix or sendmail should be configured and runing for the above script...

    i hope you got it....

    ReplyDelete
  4. Thank you very much

    ReplyDelete
  5. This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article.
    www.armadilloglass.co.uk |

    ReplyDelete
  6. This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post.
    www.zabusinessfromhome.com |

    ReplyDelete
  7. I surprised with the analysis you made to make this particular publish incredible. Wonderful activity! 
    travelodgeauburn |

    ReplyDelete
  8. It is very helpful for all the people on the web.I wanted to say that it's nice to know that someone else also mentioned this as I had trouble finding the same info elsewhere.
    southshoregreenhomes.com |

    ReplyDelete
  9. This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article.
    automazione-net.com |

    ReplyDelete
  10. This was the first place that told me the answer. I have added you to my bookmark list to check out new articles you post
    auto-satisfait |

    ReplyDelete
  11. Τhere is definately a great deal to learn ɑbout this issue. Ι love all of the points you've madе.
    exbulk |

    ReplyDelete
  12. Great article Lot's of information to Read...Great Man Keep Posting and update to People..Thanks 
    stepalaska |

    ReplyDelete
  13. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
    bluebusinessdialog |

    ReplyDelete
  14. The world is changing fast. people are also being changed.day by day we are becoming more dependant on degital system.yoU make me think of this really.You have a nice way of sharing your thoughts
    tgdffoodcongress2013 |

    ReplyDelete
  15.  It is very helpful for all the people on the web.I wanted to say that it's nice to know that someone else also mentioned this as I had trouble finding the same info elsewhere.
    Chew Food Tour |

    ReplyDelete

Note:- Comment as: Option available to post without login select "Anonymous" from the drop down...........

For Latest Updates: Subscribe Now | | Test Your Knowledge, Take a Quiz now Click Here | | Site Best Viewed In Firefox

X