This Bash script sends notifications to a Telegram chat every time a user logs in via SSH on the server.
- Operating System: Linux (Debian/Ubuntu)
- Dependencies:
curl
jq
- Telegram Credentials:
- Bot Token (generated from BotFather)
- Chat ID (found via the /getUpdates method)
-
Clone the Repository:
git clone https://github.com/diegogodoy06/install-ssh-login-alert-telegram.git cd install-ssh-login-alert-telegram
-
Grant Execution Permissions to the Script:
chmod +x install-ssh-login-alert.sh
-
Run the Script:
./install-ssh-login-alert.sh
*New SSH Login*
π₯οΈ Server: server.example.com
π€ User: user
π IP: 192.168.1.100
π
Date/Time: 22/04/2025 14:30:00