Upterm sharing: host key preflight + proxy session#3
Merged
Conversation
0952350 to
9e2dfe6
Compare
## Pre-flight uptermd host key check Upterm is launched fully detached (</dev/null), so any SSH host-key prompt hangs forever with no way to respond. Add a preflight check before detaching, while a TTY is still available. - Uses ssh-keyscan + fingerprint comparison (handles @cert-authority trust model correctly) - On mismatch: shows current vs stored fingerprint, prompts [y/N] to auto-update known-hosts - On y: strips old entries for the host:port and appends freshly scanned keys with @cert-authority prefix - On n: aborts with a helpful hint ## Proxy session — clients no longer mirror into your real session Previously --force-command attached connecting clients directly into the shared tmux session, causing the client terminal size to resize the session pane (smallest-client-wins in tmux). Now a dedicated proxy tmux session (default: _share) is created at share time. Clients land there instead and can interact with real sessions non-destructively via: tmux capture-pane -t <session> -p # read without attaching tmux send-keys -t <session> '...' Enter # write keystrokes The proxy session is created on --share and destroyed on --unshare. A bash -l fallback is included if the proxy session is killed externally. New config option: proxy-session / DS_UPTERM_PROXY_SESSION (default: _share). README updated to document the new config option and proxy behavior.
9e2dfe6 to
8e745ac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two improvements to
ds --share(upterm backend).1. Pre-flight uptermd host key check
Upterm is launched fully detached (
</dev/null), so any SSH host-key prompt hangs forever with no way to respond. This PR adds a preflight check before detaching, while a TTY is still available.ssh-keyscan+ fingerprint comparison (handles@cert-authoritytrust model)[y/N]to auto-updateknown-hostsy: strips old entries for the host:port and appends freshly scanned keys with@cert-authorityprefixn: aborts with a helpful hint2. Proxy session — clients no longer mirror into your real session
Previously,
--force-commandattached connecting clients directly into the shared tmux session. This caused the client's terminal size to resize the session pane (smallest-client-wins in tmux).Now a dedicated proxy tmux session (default:
_share) is created at share time. Clients land there instead. They can interact with real sessions non-destructively via:The proxy session is created on
--shareand destroyed on--unshare. Abash -lfallback is included if the proxy session is killed externally.New config option:
proxy-session/DS_UPTERM_PROXY_SESSION(default:_share).Changes
@cert-authorityprefix support in known-hosts auto-update_share) — clients connect here instead of real sessionbash -lfallback in--force-commandif proxy session is unavailable_share_stopproxy-sessionconfig option + proxy behavior documentedTesting
ds --shareon macOS, connected via upterm, landed in_shareproxy sessioncapture-paneandsend-keyswork against real sessions without resolution changeds --unsharecleans up proxy session