Fedora Linux Support Community & Resources Center
  #1  
Old 19th May 2012, 06:08 PM
karthick87 Offline
Registered User
 
Join Date: Nov 2011
Posts: 22
windows_7chrome
Get email alerts on SSH login

Am using Fedora 16. I just want to get Email Alerts on ssh login into my system. Is it possible ? How do i set it up ?
Reply With Quote
  #2  
Old 19th May 2012, 06:45 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,847
linuxfirefox
Re: Get email alerts on SSH login

Depends on how reliable you want it.

One simple way is to have the /etc/profile file send mail.

Another, though much more complex, is to modify the PAM module used during login to send mail. This method would be reliable.

So the simple answer is yes, it is possible. Just not necessarily reliable.
Reply With Quote
  #3  
Old 20th May 2012, 12:47 AM
Doug G Offline
Registered User
 
Join Date: Jul 2005
Posts: 640
windows_7firefox
Re: Get email alerts on SSH login

Guessing, I think there may be a hook you can put in sshd_config on the server.
__________________
======
Doug G
======
Reply With Quote
  #4  
Old 20th May 2012, 10:11 AM
flyingfsck Offline
Registered User
 
Join Date: Aug 2010
Location: Al Ain, UAE
Posts: 1,858
linuxfirefox
Re: Get email alerts on SSH login

Yup, you could use the Forcecommand option in sshd_config to send an email upon login using the sendmail or mail commands.
Reply With Quote
  #5  
Old 20th May 2012, 02:08 PM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,830
linuxfirefox
Re: Get email alerts on SSH login

I'm not sure exactly what the goal is here.

All sshd logins are logged in /var/log/secure, so the logs for his file could be redirected to a tcp connection which could be something as simple as a netcat command.

The pam_exec module can send emails or do most anything else.

The sshd ForceCommand feature replaces the login shell or the command - so it i not particularly useful.

But if the problem is that you are worried that someone has cracked system - then you should reconfigure sshd to avoid that possibility. Configure the sshd authentications to require keys (disable passwords) then install a key and be careful with the private half & any passphrase.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #6  
Old 16th June 2012, 01:46 AM
karthick87 Offline
Registered User
 
Join Date: Nov 2011
Posts: 22
windows_7chrome
Re: Get email alerts on SSH login

Hi all,

Recently i have got mail for all root ssh login. Where i have configured the settings in bash_profile, but the same stopped working without doing any modifications. Could anyone help me to traceout the problem or give me fix pls?
Reply With Quote
Reply

Tags
alerts, email, login, ssh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SELinux alerts re: wine - 12,913 alerts since 11/17/09 David Batson Using Fedora 0 9th December 2009 02:57 PM
Email on ALL ssh login attempts. monks700 Security and Privacy 6 2nd May 2009 06:40 AM
dovecot can't login to download email via thunderbird dtra Servers & Networking 1 30th July 2006 11:43 PM
mdadm email alerts - probably a really dumb question gasman Hardware & Laptops 3 17th May 2006 03:38 PM
Cannot Logout or Login to my email accounts bamboo_spider Using Fedora 4 28th July 2004 07:23 PM


Current GMT-time: 17:36 (Wednesday, 17-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat