98 lines
2.3 KiB
Markdown
98 lines
2.3 KiB
Markdown
<p align="center">
|
|
<a href="https://techniverse.net">
|
|
<img src="https://assets.techniverse.net/f1/git/graphics/repo-techniverse-logo.png" alt="Techniverse Community" height="70" />
|
|
</a>
|
|
</p>
|
|
|
|
<h1 align="center">SSH Login Notifier</h1>
|
|
|
|
<h4 align="center">
|
|
Benachrichtigungen bei SSH-Logins per E-Mail und/oder ntfy.
|
|
</h4>
|
|
|
|
<h6 align="center">
|
|
<a href="https://www.cleveradmin.de">Website</a>
|
|
·
|
|
<a href="https://techniverse.net">Community</a>
|
|
·
|
|
<a href="https://social.techniverse.net/@donnerwolke">Mastodon</a>
|
|
·
|
|
<a href="https://matrix.to/#/#support:techniverse.net">Support</a>
|
|
</h6>
|
|
<br><br>
|
|
|
|
## Funktionen
|
|
|
|
- Benachrichtigung bei jedem SSH-Login
|
|
- **E-Mail** und/oder **ntfy** als Benachrichtigungskanal (einzeln oder kombiniert)
|
|
- **Geo-Location** der Quell-IP (Land, Stadt, Provider)
|
|
- Shell-unabhängig dank **PAM-Integration** (funktioniert mit Bash, Zsh, Fish, etc.)
|
|
- Einfache Konfiguration über eine zentrale `config.conf`
|
|
- Installations- und Deinstallationsscript
|
|
|
|
## Schnellstart
|
|
|
|
### 1. Voraussetzungen prüfen
|
|
|
|
Siehe [Voraussetzungen](docs/prerequisites.md) (curl wird automatisch installiert, Mail-Tool muss ggf. manuell eingerichtet werden).
|
|
|
|
### 2. Repository klonen
|
|
|
|
```bash
|
|
git clone https://git.techniverse.net/scriptos/ssh-login-notifier.git
|
|
cd ssh-login-notifier
|
|
```
|
|
|
|
### 3. Installation
|
|
|
|
```bash
|
|
sudo bash install.sh
|
|
```
|
|
|
|
### 4. Konfiguration anpassen
|
|
|
|
```bash
|
|
sudo nano /opt/ssh-login-notifier/config.conf
|
|
```
|
|
|
|
Siehe [Konfigurationsreferenz](docs/configuration.md) für alle Optionen.
|
|
|
|
### 5. Testen
|
|
|
|
Einfach per SSH auf den Server einloggen — die Benachrichtigung sollte sofort eintreffen.
|
|
|
|
## Deinstallation
|
|
|
|
```bash
|
|
sudo /opt/ssh-login-notifier/uninstall.sh
|
|
```
|
|
|
|
## Enthaltene Informationen
|
|
|
|
Jede Benachrichtigung enthält:
|
|
|
|
| Information | Beispiel |
|
|
|---|---|
|
|
| Hostname | `srv-web-01.example.com` |
|
|
| Datum | `26.04.2026` |
|
|
| Uhrzeit | `14:32:08` |
|
|
| Benutzername | `admin` |
|
|
| Quell-IP | `203.0.113.42` |
|
|
| Standort | `Berlin, Berlin, Germany (Telekom)` |
|
|
|
|
## Dokumentation
|
|
|
|
- [Voraussetzungen](docs/prerequisites.md)
|
|
- [Konfigurationsreferenz](docs/configuration.md)
|
|
|
|
<br><br>
|
|
<p align="center">
|
|
<img src="https://assets.techniverse.net/f1/git/graphics/gray0-catonline.svg" alt="">
|
|
</p>
|
|
|
|
<p align="center">
|
|
<sub>
|
|
© Patrick Asmus · Techniverse Network · <a href="./LICENSE">Lizenz</a>
|
|
</sub>
|
|
</p>
|