Marks-Man

Administrator
Joined: Mar 15, 2021
Messages: 768
Resources: 335
Points: 63
Reaction score: 370
Put the following in /etc/profile:
if [ -n "$SSH_CLIENT" ]; then
TEXT="$(date): ssh login to ${USER}@$(hostname -f)"
TEXT="$TEXT from $(echo $SSH_CLIENT|awk '{print $1}')"
echo $TEXT|mail -s "ssh login" you@your.domain
fi
 

Marko

V.I.P Member
Registered Member
Joined: Mar 18, 2021
Messages: 11
Points: 3
Reaction score: 11
  • Tags
    erros security ssh ssh security ssh security best practices ssh security check ssh security group ssh security group aws ssh security key ssh security protocol ssh security risks ssh security test ssh security vulnerabilities
  • Top