-
Notifications
You must be signed in to change notification settings - Fork 735
Open
Description
Is your feature request related to a problem? Please describe.
I'm trying to implement an auto-notification system which sends me an email when an user connects through Wetty.
Describe the solution you'd like
I have already implemented the following configuration in /etc/ssh/sshrc, which sends me an email when an user connects via SSH. The same doesn't work when connecting from Wetty.
ip=`echo $SSH_CONNECTION | cut -d " " -f 1`
logger -t ssh-wrapper $USER login from $ip
echo "$USER - $ip" | mail -s "SECURITY ALERT: $USER has logged in from $ip" [email protected] &
Describe alternatives you've considered
I see from documentation that, when running Wetty as root, /bin/login is used for login. It's not clear to me how the same script developed for SSH can be used for /bin/login access.
Additional context
I'm running Wetty as a systemd unit file, configured as follows:
[Unit]
Description=Wetty Web Terminal
After=network.target
[Service]
Type=simple
WorkingDirectory=/usr/local/share/.config/yarn/global/node_modules/wetty/
ExecStart=wetty -p 1234 --host 0.0.0.0 --ssl-key /etc/ssl/cert/privkey.pem --ssl-cert /etc/ssl/cert/fullchain.pem
TimeoutStopSec=20
KillMode=mixed
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target
Metadata
Metadata
Assignees
Labels
No labels