Current time: 12-26-2024, 11:03 PM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo] Receive an eMail during a SSH login
Author Message
schnere Offline
Junior Member
*

Posts: 40
Joined: Apr 2007
Reputation: 0
Post: #4
RE: [HowTo] Receive an eMail during a SSH login
@c0urier: It should be
Code:
echo 'Login on' `hostname` `date` `who`| mail -s "Login on `hostname` `who | awk '{print $5}'`" YOUR@E-MAILADRESS.TLD

You may add it to /etc/profile because /etc/bash.bashrc only gets executed on starting a root shell, but /etc/profile gets executed on every user login.
(This post was last modified: 08-04-2010 07:00 PM by schnere.)
08-04-2010 06:51 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [HowTo] Receive an eMail during a SSH login - schnere - 08-04-2010 06:51 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)