Hacker News new | ask | show | jobs
by m4lvin 1094 days ago
Nice example, which opened a small rabbit hole for me: what does "first occurrence wins" mean for options that are meant to be used multiple times, such as "Port" in sshd_config. The man page only says "Multiple options of this type are permitted.", but now I wonder what happens when I put my own Port into /etc/ssh/sshd_config.d/whatever.conf but leave "Port 22" in sshd_config? Or is the (new since bookworm) default sshd_config commenting it out for this reason?

More generally, for multi-options do we maybe want "first file wins"?

1 comments

Reading in general to more specific configuration directories in order and using the last value read makes the most sense to me. This is usually how I write my own applications.

Anyway, I thoroughly document the order and precedence, but the suggestion from Chris' blog to report more detail about the process is a good one.