Your options for changing from default port:
- Turning off this change and reverting to how SSHd worked prior to this update:
systemctl disable --now ssh.socket
systemctl enable --now ssh.service
- Then the
/etc/ssh/sshd_config
works again with Ports and Addresses setting
- OR Listening socket stream update
mkdir -p /etc/systemd/system/ssh.socket.d
-
cat >/etc/systemd/system/ssh.socket.d/listen.conf <<EOF [Socket] ListenStream= ListenStream=1234 EOF
sudo systemctl daemon-reload
sudo systemctl restart ssh.socket
It should then state it’s started listening on the new port: systemctl status ssh