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.
*** This bug has been marked as a duplicate of bug 3169 ***
close bugs that were resolved in OpenSSH 8.5 release cycle