Repository navigation
+ssh terminfo installation overrides an existing ControlPath and prompts for authentication #14875
Replies: 3 comments
Source findingsIn src/cli/ssh.zig , installRemoteTerminfo() creates a random temporary control path and prepends these options before opts._ssh_args.items : For user-supplied The subsequent main SSH invocation does not prepend those control options. Proposed directionHave the terminfo installer respect the caller’s effective SSH multiplexing configuration instead of unconditionally prepending If configuration inspection is needed, extend Ghostty’s existing When a control path is configured, omit all three injected multiplexing options and let SSH use the caller’s settings. Do not retain Let SSH handle socket validation and its configured fallback behavior rather than checking for a socket file or requiring a separate Keep this change scoped to respecting existing connection-sharing configuration. Eliminating repeated authentication when no master exists would require a separate design for sharing a connection across installation and the interactive session. This approach remains unimplemented and untested. Validation should cover command-line and SSH-config settings, a working master, missing or stale sockets, disabled multiplexing, and ordinary ad hoc connections. AI assistance disclosure(Human rewritten) Perplexity Chat and Computer (on 'High' w/ Astra) assisted with troubleshooting, inspecting the source at 8112f7676 , and drafting this report. I reviewed and edited the report. |
|
for your coretunnel connection, i'd bypass just the terminfo installer: ghostty +ssh --ssh=/usr/bin/ssh --terminfo=false --verbose -- \
-o ControlMaster=no \
-S <socket> \
<destination>keep ghostty asks ssh for |
|
Thanks, that's exactly what I ended up doing. I've got a fix https://github.com/rtgibbons/ghostty/tree/fix/ssh-terminfo-control-socket - Also while digging in; it appears the old terminfo installer would setup the ControlMaster and re-use it when connecting after the terminfo install. But with the new zig +ssh implementation - it appears it's a regression in that it doesn't use it. The above branch doesn't continue that fix as I wasn't sure if that was on purpose or not. |
Uh oh!
There was an error while loading. Please reload this page.
Issue Description
On Ghostty commit 8112f7676 , automatic terminfo installation opens a new authenticated SSH connection instead of reusing my existing OpenSSH control socket.
In my scenerio the master connection is maintained by CoreTunnel. After removing an unrelated stale socket and reconnecting, /usr/bin/ssh -S -O check succeeds, and connecting directly through that socket works without another password prompt. Connecting through Ghostty’s +ssh wrapper prompts for authentication during terminfo setup.
Expected Behavior
Terminfo installation respects the caller’s existing control connection and does not require separate authentication.
Actual Behavior
The terminfo installation phase prompts for authentication even though the supplied control socket is working.
Reproduction Steps
/usr/bin/ssh -o ControlMaster=no -S <socket> <destination>Ghostty Logs
No response
Ghostty Version
OS Version Information
macOS Golden Gate 27.2
(Linux only) Display Server
None
(Linux only) Desktop Environment/Window Manager
No response
Minimal Ghostty Configuration
Additional Relevant Configuration
No response
I acknowledge that:
```) on separate lines.All reactions