diff --git a/tutorials/securing-ssh/01.de.md b/tutorials/securing-ssh/01.de.md index 695e0bf89..96beddead 100644 --- a/tutorials/securing-ssh/01.de.md +++ b/tutorials/securing-ssh/01.de.md @@ -25,6 +25,61 @@ Dabei werden die folgenden Punkte genauer erläutert: **Voraussetzungen** + SSH Dienst basierend auf OpenSSH ++ Traditionelles SSH + +Dieses Tutorial erklärt, wie man die Datei `/etc/ssh/sshd_config` bearbeitet, die vom traditionellen SSH verwendet wird. + +Wenn Ihr System Socket-basiertes SSH verwendet (Ubuntu 22.10 und höher) und Sie trotzdem diesem Tutorial folgen möchten, müssen Sie `ssh.socket` deaktivieren und `ssh.service` manuel aktivieren. + +
+
+Hier klicken für Beispiel-Befehle, um ssh.socket zu deaktivieren und ssh.service zu aktivieren + +```bash +sudo systemctl stop ssh.socket +sudo systemctl disable ssh.socket + +sudo systemctl start ssh.service +sudo systemctl enable ssh.service + +sudo systemctl restart ssh +``` + +
+
+ +### Prüfen ob traditionelles SSH oder Socket-basiertes SSH verwendet wird + +Führen Sie folgenden Befehl aus und prüfen Sie den Output: + +```bash +sudo systemctl status ssh +``` + +* **Traditional SSH** + + Der SSH Service (`ssh.service`) wird automatisch beim Systemboot von systemd gestartet. + ```shellsession + holu@example-server:~# sudo systemctl status ssh + ● ssh.service - OpenBSD Secure Shell server + Loaded: loaded (/usr/lib/systemd/system/ssh.service; enabled; preset: enabled) + Active: active (running) + ``` + In `Loaded:` steht "enabled". + +
+ +* **Socket-Based SSH** + + Der SSH Service (`ssh.service`) wird von `ssh.socket` erst gestartet, wenn die erste Verbindungsanfrage reinkommt. + ```shellsession + holu@example-server:~# sudo systemctl status ssh + ● ssh.service - OpenBSD Secure Shell server + Loaded: loaded (/usr/lib/systemd/system/ssh.service; disabled; preset: enabled) + Active: active (running) + TriggeredBy: ● ssh.socket + ``` + In `Loaded:` steht "disabled" und der Output enthält die zusätzliche Zeile `TriggeredBy: ssh.socket`. ## Schritt 1 - Absicherung des SSH Dienstes diff --git a/tutorials/securing-ssh/01.en.md b/tutorials/securing-ssh/01.en.md index bfd88b2f0..32813e6b9 100644 --- a/tutorials/securing-ssh/01.en.md +++ b/tutorials/securing-ssh/01.en.md @@ -25,6 +25,61 @@ The following points are explained in more detail: **Prerequisites** + SSH service based on OpenSSH ++ Traditional SSH + +This tutorial explains how to edit `/etc/ssh/sshd_config`, which is used by traditional SSH. + +If your system uses socket-based SSH (Ubuntu 22.10 and higher) and you still want to follow this tutorial, you will need to disable `ssh.socket` and manually enable `ssh.service`. + +
+
+Click here for commands to disable ssh.socket and enable ssh.service + +```bash +sudo systemctl stop ssh.socket +sudo systemctl disable ssh.socket + +sudo systemctl start ssh.service +sudo systemctl enable ssh.service + +sudo systemctl restart ssh +``` + +
+
+ +### Check if your system uses traditional SSH or socket-based SSH + +Run the following command and check the output: + +```bash +sudo systemctl status ssh +``` + +* **Traditional SSH** + + The SSH service (`ssh.service`) is automatically started during system boot by systemd. + ```shellsession + holu@example-server:~# sudo systemctl status ssh + ● ssh.service - OpenBSD Secure Shell server + Loaded: loaded (/usr/lib/systemd/system/ssh.service; enabled; preset: enabled) + Active: active (running) + ``` + In `Loaded:`, it will say "enabled". + +
+ +* **Socket-Based SSH** + + The SSH service (`ssh.service`) is started by `ssh.socket` when the first connection request comes in. + ```shellsession + holu@example-server:~# sudo systemctl status ssh + ● ssh.service - OpenBSD Secure Shell server + Loaded: loaded (/usr/lib/systemd/system/ssh.service; disabled; preset: enabled) + Active: active (running) + TriggeredBy: ● ssh.socket + ``` + In `Loaded:`, it will say "disabled", and the output will also include the line triggered by `ssh.socket`. ## Step 1 - Securing the SSH service