Coder Social home page Coder Social logo

vdeville / ssh-login-alert-telegram Goto Github PK

View Code? Open in Web Editor NEW
173.0 9.0 63.0 111 KB

Recieive telegram notfications when user connect to a server

License: GNU General Public License v3.0

Shell 100.00%
ssh alert telegram linux debian ubuntu security login connections audit

ssh-login-alert-telegram's Introduction

Alert via telegram when user logon via SSH

Work on all popular linux system (Debian, Ubuntu, Arch Linux etc..)

Example

Requirement

  • curl
  • git (much easy to install)

Install

  1. Clone or download to /opt/ folder cd /opt/ && git clone https://github.com/MyTheValentinus/ssh-login-alert-telegram

  2. Edit two configuration variables by editing credentials.config: vim credentials.config

  3. Add this script when user connect with the deploy script: bash deploy.sh

  4. Confirm that the script is working by logging you to ssh again.

Install with Ansible

If you have many servers go check: https://github.com/MyTheValentinus/Deploy-Telegram-SSH-Alerting-with-Ansible (fork of initial @stylernico work)

ssh-login-alert-telegram's People

Contributors

magicdrums avatar stylersnico avatar tokarev-artem avatar vdeville avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ssh-login-alert-telegram's Issues

No Hostname

Hi,

I've manually changed on all my servers the hostname on the same way. On one of them, the deployment can't be done..
The file /etc/hostname is written with one line..

/opt# sh /etc/profile.d/telegram-alert.sh hostname: Name or service not known

EDIT

I've this on tTelegram

Connection from XXX as root on (XXX)
Date: 06 sept. 2017 22:17
More informations: https://ipinfo.io/XXX (https://ipinfo.io/XXX)<

But there is no hostname, and it has no symbol or number..

Deploy failed with ZSH on CentOS

ssh-login-alert-telegram]# ./deploy.sh
Deploying alerts...
Check if ZSH is installed..
ZSH is installed, deploy alerts to zshrc
./deploy.sh: line 12: /etc/zsh/zshrc: No such file or directory
Done!

i had to chmod +x deploy.sh to be able to run it and install zsh prior running it.
i've changed the configuration file with the proper tokens and group ids but does not seems to be working. Im running it on a Centos 7

Add Logout Alert

Hi,

Possible to add notification SSH logout session based on pam session?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.