Rexxer

Some tips for me and other

FreeBSD + e-mail alert for ssh connection

Add this string to your /etc/pam.d/sshd:

session optional pam_exec.so /etc/alert.sh

where alert.sh is:

#!/bin/sh
echo ‘Shell Access on:’ `date` `who` | mail -s “Access from `who`” admin@local.com

 

 

Leave a Reply