Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Match Group' in configuration but 'user' not in connection test specification #188

@kravietz

Description

@kravietz

Describe the bug
The openssh.conf.j2 validity test fails in OpenSSH 7.7p1 (as distributed with Ubuntu 18.10) because sshd requires that specific user name is passed in the test context. I realize 18.10 is not supported officially but still worth keeping it for future reference.

Expected behavior
Just add any user to the test using -C option:
sshd -T -C user=someuser

Actual behavior
The test will always fail with the current test of /usr/sbin/sshd -T -f %s.

TASK [dev-sec.ssh-hardening : create sshd_config and set permissions to root/600] ***************************************************************************************************************************
fatal: [prol]: FAILED! => {"changed": false, "checksum": "d4665d47b3e4682db5a9a0a6f2978eabe296ea8c", "exit_status": 255, "msg": "failed to validate", "stderr": "'Match Group' in configuration but 'user' not in connection test specification.\r\n", "stderr_lines": ["'Match Group' in configuration but 'user' not in connection test specification."], "stdout": "", "stdout_lines": []}

Example Playbook

- hosts: prol
  roles:
  - dev-sec.ssh-hardening

OS / Environment

Ansible Version


Role Version


Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions