Compare commits

..

No commits in common. "2311ff28c97463c66e2967fff229abbd8cdf73cf" and "7feea8ccef17cdea794543fc17e28167cb5433dc" have entirely different histories.

View File

@ -116,12 +116,12 @@ Watchdog can send notifications on user login. Just add to ```/etc/profile.d/ssh
1. ```User=$(whoami)```
1. ```IP=$(echo $SSH_CONNECTION | awk '{ print $1 == "" ? "127.0.0.1" : $1 }')```
1. ```ICON_INFO=$(echo -e "\U2139")```
1. ```send-telegram "${ICON_INFO} SSH: User ${User} is logged in from ${IP}"```
1. ```send-telegram "${ICON_INFO} SSH: User ${Users} is logged in from ${IP}"```
- For e-mail:
1. ```User=$(whoami)```
1. ```IP=$(echo $SSH_CONNECTION | awk '{ print $1 == "" ? "127.0.0.1" : $1 }')```
1. ```ICON_INFO=$(echo -e "\U2139")```
1. ```send-mail your@mail.addr '${ICON_INFO} SSH: User ${User} is logged in' '${ICON_INFO} SSH: User ${User} is logged in from ${IP}'```
1. ```send-mail your@mail.addr '${ICON_INFO} SSH: User ${Users} is logged in' '${ICON_INFO} SSH: User ${Users} is logged in from ${IP}'```
## User logouts monitoring (*nix)