Enterprise Hosting · Von Gamern für Gamer
SSH absichern – Keys, Port ändern & Root-Login deaktivieren
Kurzantwort: SSH absicherst du in 3 Schritten: Ed25519-Key einrichten → Passwort-Login deaktivieren → optional Port ändern + Fail2ban. Teste Keys immer in einem zweiten Terminal, bevor du die Session schließt.
Wenn du hier landest: Du willst Brute-Force-Angriffe auf Port 22 stoppen oder hast gehört, dass Passwort-Login unsicher ist.
Schritt 1: SSH-Key erzeugen (lokal)
ssh-keygen -t ed25519 -C "nexorahost-server"
cat ~/.ssh/id_ed25519.pub
Schritt 2: Key auf Server
mkdir -p ~/.ssh && chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys
# Public Key einfügen
chmod 600 ~/.ssh/authorized_keys
Test: ssh -i ~/.ssh/id_ed25519 root@SERVER-IP
Schritt 3: sshd_config härten
nano /etc/ssh/sshd_config
PasswordAuthentication no
PermitRootLogin prohibit-password
PubkeyAuthentication yes
# Port 2222 (optional)
systemctl restart sshd
UFW: Neuen Port erlauben bevor du den alten schließt → Firewall Guide
Checkliste
- ✅ Key-Login funktioniert (zweites Terminal)
- ✅ PasswordAuthentication no
- ✅ Fail2ban aktiv → Fail2ban
- ✅ UFW erlaubt SSH-Port
Teil der VPS-Einrichtung: Linux VPS einrichten
Produkte & Bestellung: Root/VPS Server · Verwaltung: panel.nexorahost.de · Mein Konto · nexorahost.com (Frankfurt · 1 Tbit/s DDoS · 99,9 % Uptime)
NexoraHost
Root & VPS Server
Ryzen-Power im Maincubes FRA01 – voller Root-Zugriff, NVMe, DDoS-Schutz inklusive.
nexorahost.com · Maincubes FRA01 · 1 Tbit/s DDoS · 99,9 % Uptime