Skip to content

sshd don't start when Match blocks are used in sshd_config #869

@Wsaibot

Description

@Wsaibot
  • rear version (/usr/sbin/rear -V): 1.17.2 / 1.18
  • OS version: OS_VENDOR=RedHatEnterpriseServer OS_VERSION=7
  • Brief description of the issue: on booted rear-system, sshd failes to start. Script build/default/50_patch_sshd_config.sh add a line to sshd_config PrintMotd no. When using Match rules in sshd_config, after a Match rule are only other Match rules or end of file is supported (man sshd_config; section Match). So PrintMotd no - line should be added before Match rules.
  • Work-around, if any: change sed command in build/default/50_patch_sshd_config.sh to sed -i -e 's/ChallengeResponseAuthentication.*/ChallengeResponseAuthentication no/ig' \ -e 's/UsePAM.*/UsePam no/ig' \ -e 's/ListenAddress.*/ListenAddress 0.0.0.0/ig' \ -e '1i\PrintMotd no' \ to add PrintMotd no at the beginning.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions