F
F
fdroid2016-02-07 13:06:40
SSH
fdroid, 2016-02-07 13:06:40

How to avoid duplicate ssh authorization notification?

Hello. There is a server running Ubuntu Server 14.04. It was necessary to organize an e-mail notification when a user is authorized via ssh. Now this is implemented by writing the following in /etc/ssh/sshrc:

echo $USER $(date) $SSH_CLIENT | mail -s "ssh login" [email protected]

It works, but the notification email comes twice. At the same time, notifications from fail2ban and mdadm come normally and are not duplicated. Help to understand - what could be the reason for duplication?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question