Bug 3164 - Default port 22 sometimes not overwritten by included configuration
Summary: Default port 22 sometimes not overwritten by included configuration
Status: CLOSED DUPLICATE of bug 3169
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 8.2p1
Hardware: amd64 Linux
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-18 03:12 AEST by Toni Dietze
Modified: 2021-03-04 09:53 AEDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toni Dietze 2020-05-18 03:12:08 AEST
When setting the Port configuration in a configuration file that is included via Include keyword and when this is not the first included file, the default port 22 is not overwritten.


Example:

$ cat main.conf 
Include /path/to/sub1.conf
Include /path/to/sub2.conf

$ cat sub1.conf 
# empty configuration file

$ cat sub2.conf 
Port 42

$ sshd -T -f main.conf | grep -i '^port'
port 22
port 42


In the above example, sshd would listen on port 22 although this was changed by the configuration. When the two Include lines in main.conf are interchanged, the problem does not occur.
Comment 1 Damien Miller 2020-05-29 15:21:13 AEST

*** This bug has been marked as a duplicate of bug 3169 ***
Comment 2 Damien Miller 2021-03-04 09:53:26 AEDT
close bugs that were resolved in OpenSSH 8.5 release cycle