Notification via telegram bot when user login ssh on Linux

on
  • Install scp Command

yum install openssh-clients

  • Install git Command

yum install git

  • Add value chat_id and token to variable in the script ssh-login-telegram-notification.s

TELEGRAM_USER_CHAT_ID=”-123456789″
TELEGRAM_TOKEN=”9876543210:JNRyjED7a5RB4eDxYVmfbwDuZA2WsPk8AUgU2L”

  • Setup on CentOS cmd:

git clone https://github.com/tainguyenbp/ssh-login-telegram-notification.git
cd ssh-login-telegram-notification
cp -r ssh-login-telegram-notification.sh /etc/profile.d/

  • Setup on CentOS via scipt

git clone https://github.com/tainguyenbp/ssh-login-telegram-notification.git
cd ssh-login-telegram-notification && ./install-ssh-login-telegram-notification.sh

  • /usr/bin/curl: Cron error : Permission denied ? Check the permission of /usr/bin/curl it should be 755 if its correct then check the script files permission

chmod 755 /usr/bin/curl

  • Reference:

https://news.cloud365.vn/script-3-giam-sat-truy-cap-ssh-vao-he-thong

Leave a Reply

Your email address will not be published. Required fields are marked *