Skip to content

Monitoring of all login attempts to your server ( Requires PAM)

License

Notifications You must be signed in to change notification settings

NewRedsquare/login-status-telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

login-status-telegram

Monitoring of all login attempts to your server ( Requires PAM)

Features!

  • With PAM integration, sends a message via telegram
  • Extra infos like country, region, approximative city, and hostname ( the IP of course !)

Installation

First, do

$ git clone https://github.com/NewRedsquare/login-status-telegram.git
$ cd login-status-telegram
$ chmod +x telegram_bot.sh
$ cp telegram_bot.sh /usr/local/bin/

You will need to configure the TOKEN and the CHAT ID , see here for the token. For chat id, talk with userinfobot and send /start. Copy the ID.

Finally, add session optional pam_exec.so type=open_session seteuid /usr/local/bin/telegram_bot.sh in the file /etc/pam.d/common-session . Like this, EVERY login attempt ( from ssh, and any other method ) will be sent to telegram.

Notice the flag optional, in case of failure of this script , the authentication will not be blocked. Change it if desired.

For example : telegram_exemple

Todos

  • If there are issues :D

License

GPLv3

About

Monitoring of all login attempts to your server ( Requires PAM)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages