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

Conversation

aisbergg
Copy link
Contributor

This test case is supposed to trigger a validation error. PR #290 contains a fix for that.

@aisbergg
Copy link
Contributor Author

aisbergg commented Jun 17, 2020

The failure "Missing Match criteria for all", "/root/.ansible/tmp/ansible-tmp-1592415371.93-271673876487717/source line 13: Bad Match condition" is unintentional. The Match all block is apparently only supported in OpenSSH version 6.5p1 and above: https://unix.stackexchange.com/a/303982

What I was looking for is: 'Match LocalPort' in configuration but 'lport' not in connection test specification."

@aisbergg aisbergg mentioned this pull request Jun 17, 2020
@schurzi
Copy link
Contributor

schurzi commented Jun 18, 2020

we could solve this problem by introducing another match set for LocalPort, like with User/Group/Address/.. already. This would be placed at the end of the config and there is no need for Match all

{% for item in ssh_server_match_local_port -%}
Match LocalPort {{ item.port }}
  {% for rule in item.rules %}
    {{ rule | indent(4) }}
  {% endfor %}
{% endfor %}
{% endif %}

Another alternative is to hijack the existing ssh_server_match_user by specifying a user with the name root LocalPort 222

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants