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:
curljq
- 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