Expand description
OpenSSH host-pattern matching.
Implements Host keyword wildcard semantics: *, ?, [charset],
[!charset]/[^charset], [a-z] ranges and !pattern negation.
All functions here are pure; they own no state and depend only on
PatternEntry from the model module.
Functionsยง
- host_
pattern_ matches - Check whether a
Hostpattern matches a given alias. OpenSSHHostkeyword matches only against the target alias typed on the command line, never against the resolved HostName. - is_
host_ pattern - Does this pattern contain any SSH wildcard metacharacters?
- proxy_
jump_ contains_ self - Returns true if any hop in a (possibly comma-separated) ProxyJump value
matches the given alias. Strips optional
user@prefix and:portsuffix from each hop before comparing. Handles IPv6 bracket notation[addr]:port. Used to detect self-referencing loops. - ssh_
pattern_ match - Match a text string against an SSH host pattern.
Supports
*(any sequence),?(single char),[charset](character class),[!charset]/[^charset](negated class),[a-z](ranges) and!pattern(negation).