Mailing List Archive

[Bug 3169] New: sshd listens to port 22 AND whatever port is specified in or after Include(s)
https://bugzilla.mindrot.org/show_bug.cgi?id=3169

Bug ID: 3169
Summary: sshd listens to port 22 AND whatever port is specified
in or after Include(s)
Product: Portable OpenSSH
Version: 8.2p1
Hardware: amd64
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: sshd
Assignee: unassigned-bugs@mindrot.org
Reporter: mindrot.org@choam.com

Created attachment 3396
--> https://bugzilla.mindrot.org/attachment.cgi?id=3396&action=edit
script to reproduce the bug

Another problem with the include functionality. A 'Port' statement
AFTER 'Include' will be accepted, BUT the server will listen to that
port AND to port 22. Note that the sshd_config as shipped does NOT have
a 'Port' statement - the server defaults to 22 if no Port is specified
(appearantly before 'Incude'(s) are evaluated.)

When I move the whole sshd_config to another name
(sshd_config_with_another_name) and include it from a new sshd_config
containing just two lines:

Include /etc/ssh/sshd_config_with_another_name
Port 7722

Then the server listens to Port 7722 AND 22.

When the order is reversed:

Port 7722
Include /etc/ssh/sshd_config_with_another_name

it will listen to port 7722 ONLY.

Previously reported to the Ubuntu people, but they referred me here.
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1876320 . I feel
this could be something simple, but I cannot find it in the source.
Sorry.

--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs