Skip to content

feat: per-server reuse_connection option (fresh SSH connection per operation) - #93

Merged
blackaxgit merged 2 commits into
mainfrom
fix/fresh-connection-per-command
Dec 3, 2026
Merged

blackaxgit merged 2 commits into
mainfrom
fix/fresh-connection-per-command

Conversation

@blackaxgit

Copy link
Copy Markdown
Owner

Windows OpenSSH (verified on OpenSSH_for_Windows_9.5) gives every exec channel after the first on one connection the first channel's SSH_ORIGINAL_COMMAND, so a ForceCommand wrapper on Windows saw the first command repeated for every later execute over the pooled connection (reproduced with plain OpenSSH ControlMaster as well).

reuse_connection = false on a server opens a new connection for each execute / upload / download and closes it afterwards (success or error), never pooling it. Default true keeps today's behaviour unchanged.

Tests: models/config parsing (strict bool), pooled vs fresh path, close on error/timeout, close failure does not mask the result, group execute, SFTP paths. Full suite, ruff, ruff format, mypy green locally.

…ion)

Windows OpenSSH hands every exec channel after the first on one connection the
first channel's SSH_ORIGINAL_COMMAND, so ForceCommand wrappers on Windows saw
the first command repeated. reuse_connection = false opens and closes a new
connection per execute/upload/download; default true keeps today's pooling.
@blackaxgit
blackaxgit merged commit a853ad5 into main Dec 3, 2026
9 checks passed
@blackaxgit
blackaxgit deleted the fix/fresh-connection-per-command branch December 3, 2026 05:25
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