debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #02064
[Bug 2114144] Re: Openssh Server ignores Port xxx
Can you please elaborate on what "broken" means in your case? What does
the failure look like?
In a 24.04 container, I am able to configure a second port, listen on
them fine, and connect via either port from my host to the container
(see below for my terminal output).
Thanks for sharing your sshd config. Can you please also share the
output of:
$ systemctl cat ssh.service
$ systemctl cat ssh.socket
$ systemctl status ssh.socket ssh.service
--
root@n:~# apt policy openssh-server
openssh-server:
Installed: 1:9.6p1-3ubuntu13.12
Candidate: 1:9.6p1-3ubuntu13.12
Version table:
*** 1:9.6p1-3ubuntu13.12 500 (phased 95%)
500 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
100 /var/lib/dpkg/status
1:9.6p1-3ubuntu13.11 500
500 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages
1:9.6p1-3ubuntu13 500
500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages
root@n:~# systemctl status ssh.socket
● ssh.socket - OpenBSD Secure Shell server socket
Loaded: loaded (/usr/lib/systemd/system/ssh.socket; enabled; preset: enabled)
Active: active (listening) since Thu 2025-06-12 13:06:26 UTC; 27s ago
Triggers: ● ssh.service
Listen: [::]:22 (Stream)
CGroup: /system.slice/ssh.socket
Jun 12 13:06:26 n systemd[1]: Listening on ssh.socket - OpenBSD Secure Shell server socket.
root@n:~# systemctl status ssh.service
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/usr/lib/systemd/system/ssh.service; disabled; preset: enabled)
Active: active (running) since Thu 2025-06-12 13:07:27 UTC; 11s ago
TriggeredBy: ● ssh.socket
Docs: man:sshd(8)
man:sshd_config(5)
Process: 717 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 718 (sshd)
Tasks: 1 (limit: 18286)
Memory: 3.0M (peak: 3.7M)
CPU: 47ms
CGroup: /system.slice/ssh.service
└─718 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
Jun 12 13:07:27 n systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Jun 12 13:07:27 n sshd[718]: Server listening on :: port 22.
Jun 12 13:07:27 n systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Jun 12 13:07:28 n sshd[720]: Accepted publickey for ubuntu from 10.19.111.1 port 55494 ssh2: RSA SHA256:VMGz6tsZ02V9ra>
Jun 12 13:07:28 n sshd[720]: pam_unix(sshd:session): session opened for user ubuntu(uid=1000) by ubuntu(uid=0)
Here is where I add a second port configuration:
root@n:~# cat > /etc/ssh/sshd_config.d/port.conf << EOF
Port 22
Port 443
EOF
root@n:~# systemctl daemon-reload
root@n:~# systemctl restart ssh.socket
root@n:~# systemctl status ssh.socket
● ssh.socket - OpenBSD Secure Shell server socket
Loaded: loaded (/usr/lib/systemd/system/ssh.socket; enabled; preset: enabled)
Drop-In: /run/systemd/generator/ssh.socket.d
└─addresses.conf
Active: active (running) since Thu 2025-06-12 13:20:05 UTC; 24s ago
Triggers: ● ssh.service
Listen: [::]:443 (Stream)
[::]:22 (Stream)
CGroup: /system.slice/ssh.socket
Jun 12 13:20:05 n systemd[1]: Stopping ssh.socket - OpenBSD Secure Shell server socket...
Jun 12 13:20:05 n systemd[1]: Listening on ssh.socket - OpenBSD Secure Shell server socket.
root@n:~# systemctl cat ssh.socket
# /usr/lib/systemd/system/ssh.socket
[Unit]
Description=OpenBSD Secure Shell server socket
Before=sockets.target ssh.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
[Socket]
ListenStream=22
Accept=no
FreeBind=yes
[Install]
WantedBy=sockets.target
RequiredBy=ssh.service
# /run/systemd/generator/ssh.socket.d/addresses.conf
# Automatically generated by sshd-socket-generator
[Socket]
ListenStream=
ListenStream=443
ListenStream=22
root@n:~# systemctl status ssh.service
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/usr/lib/systemd/system/ssh.service; disabled; preset: enabled)
Active: active (running) since Thu 2025-06-12 13:20:05 UTC; 4min 34s ago
TriggeredBy: ● ssh.socket
Docs: man:sshd(8)
man:sshd_config(5)
Process: 960 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 962 (sshd)
Tasks: 1 (limit: 18286)
Memory: 1.4M (peak: 4.2M)
CPU: 106ms
CGroup: /system.slice/ssh.service
└─962 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
Jun 12 13:20:05 n systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Jun 12 13:20:05 n sshd[962]: Server listening on :: port 443.
Jun 12 13:20:05 n sshd[962]: Server listening on :: port 22.
Jun 12 13:20:05 n systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
Jun 12 13:24:18 n sshd[972]: Accepted publickey for ubuntu from 10.19.111.1 port 56454 ssh2: RSA SHA256:VMGz6tsZ02V9ra>
Jun 12 13:24:18 n sshd[972]: pam_unix(sshd:session): session opened for user ubuntu(uid=1000) by ubuntu(uid=0)
Jun 12 13:24:34 n sshd[1048]: Accepted publickey for ubuntu from 10.19.111.1 port 39962 ssh2: RSA SHA256:VMGz6tsZ02V9r>
Jun 12 13:24:34 n sshd[1048]: pam_unix(sshd:session): session opened for user ubuntu(uid=1000) by ubuntu(uid=0)
In the above status output, both of my connections can be seen.
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to openssh in Ubuntu.
https://bugs.launchpad.net/bugs/2114144
Title:
Openssh Server ignores Port xxx
Status in openssh package in Ubuntu:
Incomplete
Bug description:
I have:
Port 22
Port 443
In my sshd_config, to have it listen to a secondary port 443 to get around firewalls that block ssh.
Until a few days ago, like port forwarding, this worked, but now, like port forwarding, it is broken.
The second Port item is just ignored. It is not acceptable for Canonical to randomly break important functionality like this.
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: openssh-server 1:9.6p1-3ubuntu13.11
Uname: Linux 6.15.0 x86_64
ApportVersion: 2.28.1-0ubuntu3.7
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: MATE
Date: Thu Jun 12 00:07:41 2025
SourcePackage: openssh
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/2114144/+subscriptions
References