Photo by AbsolutVision / Unsplash

SSHd | Ubuntu 22.10 und später

Ubuntu 29. Okt. 2025

Alternativer Port

Der SSHd service wurde bis dato immer in der sshd_conf datei mit dem Flag

Port 4711

konfiguriert.

Nachdem ihr eine neuere Version als Ubuntu 22.10 installiert habt, wirst du feststellen, dass der Dienst - trotzt änderung in der sshd_config Datei - nur auf Port 22 läuft.

Hintergrund ist die Änderung auf socket basierte aktivierung.

Lösung zum alten Weg:

sudo systemctl disable --now ssh.socket
sudo systemctl enable --now ssh.service
# check the status of the service
sudo systemctl status ssh

Disable ssh-socket service and enable the new ssh-service

Lösung für den socket-basierten Weg:

sudo systemctl edit ssh.socket
# change these rows to your need
ListenStream=
ListenStream=[::]:4711
ListenStream=0.0.0.0:4711
# save and close
sudo systemctl daemon-reload
sudo systemctl restart ssh.socket
# check the status of the service
sudo systemctl status ssh

Tags