The man 5 sshd_config fails to clarify what happens when multiple qualifying Match blocks specify the same configuration option. This patch updates the man page to do so. I tested the behaviour and described what was empirically observed. I can only assume this is the desired behaviour. This is a first attempt. If format or something else is off, let me know; I'll be happy to adjust. ---- Match Introduces a conditional block. If all of the criteria on the Match line are satisfied, the keywords on the following lines override those set in the global section of the config file, until either another Match line or the end of the file. If multiple Match blocks are satisfied, and a keyword is specified multiple times, the first Match block instance of the keyword is honored. -------------- next part -------------- --- sshd_config.5 2013-02-11 20:02:08.000000000 -0800 +++ sshd_config.5.jlm 2013-12-12 08:13:42.000000000 -0800 @@ -731,7 +731,12 @@ line are satisfied, the keywords on the following lines override those set in the global section of the config file, until either another .Cm Match -line or the end of the file. +line or the end of the file. If multiple +.Cm Match +blocks are satisfied, and a keyword is specified multiple times, the +first +.Cm Match +block instance of the keyword is honored. .Pp The arguments to .Cm Match
Loganaden Velvindron
2013-Dec-12 16:42 UTC
submission: sshd_config documentation clarification
please open a ticket here as well: https://bugzilla.mindrot.org/ On Thu, Dec 12, 2013 at 8:34 PM, J's Mail <jmales at gmail.com> wrote:> The man 5 sshd_config fails to clarify what happens when multiple > qualifying Match blocks specify the same configuration option. This > patch updates the man page to do so. > > I tested the behaviour and described what was empirically observed. I > can only assume this is the desired behaviour. > > This is a first attempt. If format or something else is off, let me > know; I'll be happy to adjust. > > ---- > Match > Introduces a conditional block. If all of the criteria on the Match > line are satisfied, the keywords on the following lines override those > set in the global section of the config file, until either another > Match line or the end of the file. If multiple Match blocks are > satisfied, and a keyword is specified multiple times, the first Match > block instance of the keyword is honored. > > _______________________________________________ > openssh-unix-dev mailing list > openssh-unix-dev at mindrot.org > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev >-- This message is strictly personal and the opinions expressed do not represent those of my employers, either past or present.
Reasonably Related Threads
- [Bug 2184] New: sshd_config Match block clarification
- [Bug 2663] New: [man] sshd_config(5) AuthenticationMethods segment clarification, proposal and questions
- Problems in slogin.1, sshd_config.5, ssh_config.5
- [Bug 1587] New: [man] sshd_config(5) provide examples of keyword 'Match'
- Match Statement in sshd_config