Skip to content

Give construct ssh keepalives by default - #1186

Merged
edwin-zvs merged 1 commit into
mainfrom
feat/ssh-server-alive-defaults
Aug 3, 2026
Merged

Give construct ssh keepalives by default#1186
edwin-zvs merged 1 commit into
mainfrom
feat/ssh-server-alive-defaults

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Summary

construct ssh sessions die when the underlying SSH TCP path idles out (common on Wi‑Fi / home NAT). The TUI then vanishes with OpenSSH errors (Connection reset by peer, client_loop: send disconnect: Broken pipe) — not a Construct panic.

This PR makes the wrapper inject modest client keepalives automatically:

  • -o ServerAliveInterval=30
  • -o ServerAliveCountMax=6

If the user already passed either option (-o ServerAliveInterval=…, compact -oKey=…, any case), that setting is left alone and only the missing default is added.

No user config change required.

Test plan

  • cargo test -p construct-cli clipboard_bridge (16 tests)
  • cargo build -p construct-cli
  • Manual: construct ssh <host>, leave idle ~a few minutes on flaky Wi‑Fi; session should stay up. Override with construct ssh -o ServerAliveInterval=10 host and confirm no duplicate default interval.

Long-lived remote TUI sessions die with "Connection reset by peer" /
"Broken pipe" when idle Wi-Fi or NAT drops the TCP path. Inject
ServerAliveInterval=30 and ServerAliveCountMax=6 into the ssh argv when
the user has not already set those options, so construct ssh stays up
without requiring ~/.ssh/config changes.
@edwin-zvs
edwin-zvs merged commit 185e81a into main Aug 3, 2026
1 of 2 checks passed
@edwin-zvs
edwin-zvs deleted the feat/ssh-server-alive-defaults branch August 3, 2026 05:53
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