Skip to content

Conversation

@XYenon
Copy link
Contributor

@XYenon XYenon commented Jan 3, 2026

SSH Connection Multiplexing (fixes #225)

  • Introduce SshControlMaster and SshMultiplexer in new src/ssh.rs module
  • Leverage OpenSSH's ControlMaster functionality to maintain persistent connections
  • Socket files stored securely in XDG_RUNTIME_DIR, TMPDIR, or ~/.cache
  • Add --no-ssh-multiplexing flag to disable this feature

Rollback Check Safety (fixes #106)

  • Add --no-rollback-fresh-connection flag to control rollback check behavior
  • By default, rollback checks use fresh SSH connections to avoid false positives when sshd is broken
  • Filter out ControlPath/ControlMaster options and add -o ControlPath=none for rollback checks

XYenon added 2 commits January 3, 2026 16:37
Use OpenSSH ControlMaster to multiplex SSH connections when deploying
multiple profiles to the same node. This avoids establishing a new SSH
connection for each profile, significantly improving deployment speed.

- Add ssh module with SshControlMaster and SshMultiplexer
- Establish control master after build, before push/deploy
- Inject ControlPath option into ssh_opts for all SSH commands
- Use XDG_RUNTIME_DIR/TMPDIR for socket files (secure, user-private)
- Add --no-ssh-multiplexing flag to disable (enabled by default)
- Clean up control masters when deployment completes
…issue

By default, rollback check now uses a fresh SSH connection instead of
reusing multiplexed connections. This prevents false-positive success
when SSH is broken but an existing connection is still open.

Fixes: serokell#106
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.

Use less SSH connections / UX improvements for interactive SSH login flows Magic rollback gets confused with multiplexed SSH connections

1 participant