On Fri, Jun 14, 2002 at 04:37:02PM +1000, Rasjid Wilcox [EMAIL PROTECTED]
wrote:
I am allowing remote access via SSH and port forwarding, but would like to
be notified via email of when users are logging in (and ideally off), and
where they are logging in from.
Before I run off and do this
Tony Clayton [EMAIL PROTECTED] said:
Assuming that all your users use bash, you can add a file
/etc/profile.d/ssh-notification:
if [ $SSH_CLIENT ]; then
mail -s SSH: $USER from $SSH_CLIENT admin EOF
EOF
fi
Great idea Tony. I'd like to change this and instead of sending an e-mail
Trevor [EMAIL PROTECTED] said:
echo `date` $SSH_CLIENT logfile.txt
Thanks Trevor.
Finished /etc/profile.d/ssh-notification.sh now looks like this:
-rwxr-xr-x 1 root root 113 Jun 14 09:40 ssh-notification.sh
#!/bin/sh
if [ $SSH_CLIENT ]; then
echo SSH: $USER from $SSH_CLIENT on `date`
All,
You might be interested in using logsentry from Psionic Technologies - see
http://www.psionic.com/products/logsentry.html This will automatically log
SSH and other activities - you get to choose what you want to show.
This is GPL software, and works with portsentry to automatically log
On Fri, Jun 14, 2002 at 04:23:10PM -, Darrell May [EMAIL PROTECTED] wrote:
Tony Clayton [EMAIL PROTECTED] said:
Assuming that all your users use bash, you can add a file
/etc/profile.d/ssh-notification:
if [ $SSH_CLIENT ]; then
mail -s SSH: $USER from $SSH_CLIENT admin EOF