SSH Login notifications for Telegram
- Clone this repo
- Register a bot in Telegram: https://core.telegram.org/bots#3-how-do-i-create-a-bot
- Put your Telegram user id and bot token to
telessh.sh
file - Put
telessh.sh
file to the/etc/profile.d/
Do you want to change something in the script? Create a PR!
I've created a simple script to figure out your Telegram id.
- Install a jq, a simple JSON parser for Linux:
sudo apt install jq
(May vary for different Linux distributions) - Place your bot token into
get_tg_id.sh
- Write any message to your bot in Telegram
- Run
get_tg_id.sh