Native SSH Session Inheritance #10267
Unanswered
yvessigner
asked this question in
Feature Requests, Ideas
Replies: 1 comment
-
|
I've seen two similar proposals in other discussion but have elaborated on mine to include ideas for specific implementation. there is some overlap, I hope this still warrants attention. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, when I am running an SSH session in Ghostty and open a new split or window, it spawns a fresh local shell. This breaks flow when working on remote servers, as I have to manually re-SSH and navigate back to my working directory. I know tmux is great but I would love to preserve the native UI and config simplicity that ghostty provides.
Possibly handling this via a wrapper (e.g..ghossty ssh) that automatically sets up ControlMaster sockets for connection reuse. Detects when a split is requested from an active SSH pane. Automatically connects the new pane to the same host (reusing the socket) and persists the working directory.
Context Awareness
When a user splits a pane while an SSH session is active, Ghostty should detect the remote host.
Connection Reuse
The new split should automatically connect to the same host using a shared ControlMaster socket.
Directory Persistence
The new split should open in the same remote working directory as the parent pane.
Configuration / Keybinds
Ideally, this would be the default behavior for new_split when inside an SSH session. However, to allow users to spawn a local shell if needed, we could have distinct actions:
Standard Split (Cmd+D): inherits SSH if active, otherwise local.
Force Local Split (Cmd+Shift+D/N): Always opens a local shell, even if the current pane/window is SSH.
Alternative Implementation
If automatic detection is too complex, a dedicated keybind action new_split:inherit_ssh would be a great middle ground.
Beta Was this translation helpful? Give feedback.
All reactions