/ssh-login-notification

Sends a notification when a login via SSH occurs

Primary LanguageGoApache License 2.0Apache-2.0

Go Report Card

sends a notification (preferably) via telegram when a successful SSH login event occurred.

configuration

Create a config file in either /etc/default/sshnotification.json or $HOME/.sshnotification/sshnotification.json:

{
    "telegram_token": "your-super-secret-bot-token",
    "telegram_id": 123456789
}

Add the following line as the last line in /etc/pam.d/sshd:

session optional pam_exec.so /path/to/sshloginnotification

screenshot