2.3 KiB
2.3 KiB
Konfiguration
Die Konfigurationsdatei befindet sich unter:
/opt/ssh-login-notifier/config.conf
Nach der Installation kann sie jederzeit bearbeitet werden:
sudo nano /opt/ssh-login-notifier/config.conf
Änderungen werden sofort beim nächsten SSH-Login wirksam — kein Neustart nötig.
Benachrichtigungsmethoden
| Schlüssel | Werte | Beschreibung |
|---|---|---|
NOTIFICATION_METHODS |
email, ntfy, email,ntfy |
Kommasepariert für mehrere Methoden |
E-Mail Einstellungen
| Schlüssel | Beschreibung | Beispiel |
|---|---|---|
EMAIL_RECIPIENT |
Empfänger-Adresse | admin@example.com |
EMAIL_FROM |
Absender-Adresse | noreply@example.com |
EMAIL_SUBJECT_PREFIX |
Betreff-Prefix (Hostname wird angehängt) | SSH Login |
Voraussetzung: Ein funktionierender Mail-Versand auf dem System (siehe Voraussetzungen).
ntfy Einstellungen
| Schlüssel | Beschreibung | Beispiel |
|---|---|---|
NTFY_SERVER |
Server-URL (ohne / am Ende) |
https://ntfy.example.com |
NTFY_TOPIC |
Topic-Name | ssh-login |
NTFY_PRIORITY |
Priorität (1–5) | 3 |
NTFY_TAGS |
Emoji-Tags, kommasepariert | warning,computer |
NTFY_AUTH_TOKEN |
Bearer-Token (leer = keine Auth) | tk_abc123 |
ntfy Prioritäten
| Wert | Bedeutung |
|---|---|
1 |
Minimum |
2 |
Niedrig |
3 |
Standard |
4 |
Hoch |
5 |
Maximum (dringend) |
Erweiterte Einstellungen
| Schlüssel | Werte | Beschreibung |
|---|---|---|
GEO_LOOKUP |
true / false |
IP-Standort über ip-api.com abfragen |
Beispielkonfigurationen
Nur ntfy (einfachste Variante)
NOTIFICATION_METHODS=ntfy
NTFY_SERVER=https://ntfy.example.com
NTFY_TOPIC=ssh-alerts
NTFY_PRIORITY=4
NTFY_TAGS=warning,skull
NTFY_AUTH_TOKEN=tk_dein_token
GEO_LOOKUP=true
Nur E-Mail
NOTIFICATION_METHODS=email
EMAIL_RECIPIENT=admin@example.com
EMAIL_FROM=server@example.com
EMAIL_SUBJECT_PREFIX=SSH Login
GEO_LOOKUP=true
Beides kombiniert
NOTIFICATION_METHODS=email,ntfy
EMAIL_RECIPIENT=admin@example.com
EMAIL_FROM=server@example.com
EMAIL_SUBJECT_PREFIX=SSH Login
NTFY_SERVER=https://ntfy.example.com
NTFY_TOPIC=ssh-alerts
NTFY_PRIORITY=3
NTFY_TAGS=warning,computer
NTFY_AUTH_TOKEN=
GEO_LOOKUP=false