Skip to content

Feat/openssh multiplexing - #100

Merged
wentf9 merged 7 commits into
masterfrom
feat/openssh-multiplexing
Nov 7, 2026
Merged

wentf9 merged 7 commits into
masterfrom
feat/openssh-multiplexing

Conversation

@wentf9

@wentf9 wentf9 commented Nov 7, 2026

Copy link
Copy Markdown
Owner

No description provided.

Implements full OpenSSH-compatible multiplexing (ControlMaster,
ControlPath, ControlPersist) across CLI commands (ssh, exec, scp, sftp)
and core/ssh transport.

Key improvements:
- Control socket lifecycle management, daemon handoff, and background execution
- OpenSSH mux client protocol implementation (-O check/forward/cancel/exit/stop/proxy)
- Socket access control and peer credential verification on Unix/Linux/macOS/FreeBSD
- File descriptor passing for passenger sessions over Unix domain sockets
- Preserves core architecture decoupling and full invariant alignment across target resolution
…rchy

- Introduce core/ssh.Options registry supporting 19 OpenSSH client options across mux, transport, auth, and trust classes.
- Replace narrow control schema with extensible ssh_options across global and node configurations, serializing as canonical snake_case with PascalCase input acceptance.
- Enforce 4-tier precedence hierarchy (CLI -o > Node ssh_options > Global ssh_options > ~/.ssh/config) with field-by-field merging semantics.
- Guard host trust security: never inherit trust-class options (StrictHostKeyChecking, UserKnownHostsFile) from ~/.ssh/config; disable mux and host trust overrides in MCP and verification contexts.
- Support runtime authentication policies, IdentitiesOnly, PreferredAuthentications, node-scoped keepalives, ConnectTimeout, and BatchMode.
- Isolate jump-hop multiplexing daemons from target-scoped session options.
- Update documentation and comprehensive test suites across core, pkg, and cmd.
…agement

- Added detailed error handling for control socket connection issues, including specific messages for "Connection refused" and "No such file or directory".
- Improved handling of session control options in SSH adapter, ensuring proper configuration and fallback.
- Refactored tests to utilize temporary directories for socket paths, enhancing test isolation and reliability.
- Updated symbolic link handling in SFTP client to ensure compatibility across platforms, particularly Windows.
- Introduced helper functions for creating temporary directories in tests to streamline socket path management.
- Enhanced error messages for socket creation and binding, providing clearer feedback on failures.
@wentf9
wentf9 force-pushed the feat/openssh-multiplexing branch from 8fe2bf8 to 9cc9bc9 Compare November 7, 2026 11:41
@wentf9
wentf9 merged commit 1baceaa into master Nov 7, 2026
14 of 15 checks passed
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