Skip to content

test: lock host targeting to what ssh -G resolves - #26

Merged
uhs-robert merged 1 commit into
mainfrom
test/host-targeting
Sep 11, 2026
Merged

uhs-robert merged 1 commit into
mainfrom
test/host-targeting

Conversation

@uhs-robert

Copy link
Copy Markdown
Owner

Since #22 the mount path passes whole host objects to the SSH builders, so every command carries an explicit -l/-p. That looked like it might override Match or Host * blocks, but SSHConfig.get_host_config resolves through ssh -G, so those flags are OpenSSH's own resolved values — and the commands still target the alias, not the resolved hostname, so ssh re-resolves at connect time.

Nothing covered that. These specs pin it for all four builders, plus the user@host -p 2222 case where the flags are the only way the target reaches ssh at all.

No production code changes. Verified the specs fail when append_host_options stops emitting the flags.

The mount path passes whole host objects to the builders, so every command
now carries an explicit -l/-p. Nothing proved those matched plain
`ssh <alias>`, which is the failure a user would never think to check.
@uhs-robert
uhs-robert merged commit b3b8be5 into main Sep 11, 2026
3 checks passed
@uhs-robert
uhs-robert deleted the test/host-targeting branch September 11, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant