Coder Social home page Coder Social logo

ssh-notify's Introduction

SSH Connection Notifier

Ce script Bash vous permet de recevoir une notification à chaque fois qu'une connexion SSH est établie sur votre machine. La notification est envoyée à un service en ligne pour une gestion facile.

Prérequis

Avant d'utiliser ce script, assurez-vous d'avoir installé les dépendances suivantes :

  • curl: Utilisé pour envoyer les notifications HTTP.

Configuration

  1. Copiez le fichier ssh-notify.sh dans le répertoire /etc/profile.d/ :

    cp ssh-notify.sh /etc/profile.d/
  2. Ouvrez le fichier de configuration ssh-notify.conf.template :

    nano /etc/ssh-notify.conf.template
  3. Modifiez les valeurs des variables suivantes selon vos besoins :

    • NTFY: L'URL du service de notification en ligne.
    • USERNAME: Votre nom d'utilisateur pour le service de notification.
    • PASSWORD: Votre mot de passe pour le service de notification.
  4. Enregistrez les modifications et enregistrer le fichier dans etc.

    cp ssh-notify.conf.template /etc/ssh-notify.conf

Utilisation

Le script sera automatiquement exécuté chaque fois qu'un utilisateur établira une connexion SSH sur la machine. Les notifications seront envoyées en fonction de la configuration définie dans le fichier ssh-notify.conf.

Remarques

  • Assurez-vous que votre machine a accès à Internet pour pouvoir envoyer les notifications.
  • Veillez à garder votre fichier de configuration sécurisé, car il contient des informations d'identification sensibles.

N'hésitez pas à personnaliser le fichier README en ajoutant plus de détails sur le fonctionnement de votre script ou en fournissant des instructions supplémentaires pour les utilisateurs.

ssh-notify's People

Contributors

probatou avatar

Stargazers

 avatar

Watchers

 avatar

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.