sonst funktioniert der Zeilenumbruch \n nicht.-e Interpretierung von Maskierungen mittels Rückschrägstrich aktivieren
dpkg-reconfigure dash
#!/bin/bash
#
if [[ -z "$USER" ]]
then
exit 0
fi
HN=$(hostname -f)
TIME=$(date "+%d.%m.%Y %H:%M")
TEXT="Date: $TIME
Server: $HN
User: $USER
IP: $SSH_CLIENT"
echo -e "Subject: Login: $USER auf $HN\n\n$TEXT" | sendmail name@domain.tld
unset HN TIME TEXT
/etc/ssh/sshrc: 3: /etc/ssh/sshrc: [[: not found
Mail handler 'limit-out' said: REPLY:554:5.7.0 Your message could not be sent. The user admin is not allowed to send email.
uid=1000(admin) gid=100(users) Gruppen=100(users)
We use essential cookies to make this site work, and optional cookies to enhance your experience.