Running a script on login
From: Chris Jensen (cjensen_at_gmail.com)
Date: 09/11/05
- Previous message: diabolo_at_cotse.net: "log scp interactions with openssh"
- Next in thread: Nicolas Alejandro Salvo: "Re: Running a script on login"
- Reply: Nicolas Alejandro Salvo: "Re: Running a script on login"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 11 Sep 2005 13:59:46 +1000 To: secureshell@securityfocus.com
Hi,
I'm trying to figure out how to run a script upon a successful login
(of any user) via openssh.
The ssh server is being setup for very limited remote access, so we'd
like to monitor logins by having an email sent to the administrator
whenever a user is successfully logged in.
We only want the script to trigger for openssh logins (local logins
we're not interested in), but I can't figure out how to set this up
other than in the .bash_profile
The other thing I considered was having a cron job watch the
authentication logs, but I'd prefer something that runs only when
necissary than having to constantly poll the logs.
I've googled and come up with nothing, and read through all the config
options and can't find anything. I also thought of using a PAM module
to do this, but can't find anything appropriate.
Any ideas?
Regards
Chris
- Previous message: diabolo_at_cotse.net: "log scp interactions with openssh"
- Next in thread: Nicolas Alejandro Salvo: "Re: Running a script on login"
- Reply: Nicolas Alejandro Salvo: "Re: Running a script on login"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|