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


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

Posts: 89
Joined: Jun 2007
Reputation: 1
Post: #5
RE: [HowTo] Receive an eMail during a SSH login
(08-04-2010 06:51 PM)schnere Wrote:  @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.

Well the way I posted it, it works in my /etc/bash.bashrc - But only when I removed the extra signs =).
08-04-2010 08:25 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 - c0urier - 08-04-2010 08:25 PM

Forum Jump:


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