Bug #26499
closed
Standard Rudder technique “SSH server (OpenSSH)” breaks SSH server if Match blocks exists in sshd_config
Added by Michel BOUISSOU 2 months ago.
Updated 2 days ago.
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Very Small
Description
sshd_config can end with Match blocks such as :
# Additional Match Blocks
Match User john,susie,jane,tom
AllowTcpForwarding no
X11Forwarding no
PermitTTY yes
Such blocks do not “end” unless another such block begins.
Rudder standard technique “SSH server (OpenSSH)” appends defined global parameters at the end of the sshd_config file.
This causes the sshd daemon to fail restarting, as it considers this global parameters to be part of the previous “Match” block, which make the configuration invalid.
By the way this is contrary to “man sshd_config(5)” that states that global parameters after match blocks should make the server consider that the block ended.
But it doesn't work and practically speaking in such cases, th sshd daemon just fails starting.
- Assignee set to Elaad FURREEDAN
This ticket is tricky to fix as it would need a total rewrite of the technique to fix this problem
This might be fixable with Augeas module.
As a workaround we may document that we don't support Match User at the end of the file ?
- Priority changed from To review to 1 (highest)
- Effort required set to Very Small
- Status changed from New to In progress
- Status changed from In progress to Pending technical review
- Assignee changed from Elaad FURREEDAN to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/1870
- Status changed from Pending technical review to Pending release
- Fix check changed from To do to Checked
- Status changed from Pending release to Released
This bug has been fixed in Rudder 8.2.6 and 8.3.1 which were released today.
Also available in: Atom
PDF