Local shell
Starts the local ssh client on Ghostty’s local PTY.
ssh user@example.comforeground local ssh processRun:
ssh user@example.comA remote prompt appears in the same Ghostty surface. The pixels are local. The shell producing the prompt is remote. Between them are two operating systems, two PTY relationships, and an encrypted byte channel.
Owns:
ssh client process;ssh process.Owns:
sshd server process;The network transports encrypted data. It does not transport a window or GPU frame.
Your local shell starts ssh as its foreground child. From Ghostty’s immediate perspective, ssh is simply the terminal application attached to the local PTY.
src/termio/Exec.zig:88–150Read threadEnter through process startup. For an SSH session, this local subprocess is ssh—not the remote shell.SSH authenticates, negotiates encryption, and normally requests a remote PTY for an interactive session. The remote SSH server starts the remote account’s shell with the slave side of that remote PTY.
A local studio opens a secure contribution line to a reporter at another stadium.
Starts the local ssh client on Ghostty’s local PTY.
ssh user@example.comforeground local ssh processSuppose you type:
uname -aInput path:
keyboard→ local OS/window event→ Ghostty input encoding→ local PTY master→ local ssh process→ SSH encrypted channel→ remote sshd→ remote PTY master→ remote shellThe remote shell parses and starts remote uname. It runs under the remote kernel and reads remote system information.
Output path:
remote uname stdout→ remote PTY slave/master→ remote sshd→ encrypted network→ local ssh process stdout→ local PTY slave/master→ Ghostty parser/state/fonts/GPU→ local displayremote process output bytes eventually become local GPU pixels.
The remote application needs to know what kind of terminal behavior exists at the far end. SSH forwards selected environment information, commonly including TERM. The remote program uses that value and terminfo data to choose control sequences.
The value does not mean “the remote machine has Ghostty’s GPU.” It describes the terminal protocol capabilities expected through the connection. Rendering still happens locally.
Incorrect or missing terminal capability information can cause broken colors, keys, or screen updates even when network transport works perfectly.
When the Ghostty window changes size:
No remote pixel image is resized. Terminal dimensions and fresh terminal output propagate.
Networks split and delay data. SSH preserves ordered byte streams, but Ghostty may receive output in different chunk sizes from those written remotely. A correct terminal parser cannot assume one read call contains one complete escape sequence or one complete UTF-8 character.
This is why parser state persists across chunks.
Now run tmux after connecting:
ssh user@example.comtmux attachThe nesting becomes:
local Ghostty ↕ local PTYlocal ssh client ↕ encrypted networkremote sshd ↕ remote session PTYremote tmux client/server ↕ pane PTY A → remote shell/program ↕ pane PTY B → remote shell/programA pane application’s output may be:
Detach from remote tmux and close SSH: remote pane processes can continue because the remote tmux server owns them. Close Ghostty without tmux: whether the remote command survives depends on SSH/session behavior, not Ghostty rendering.
Another arrangement is:
local Ghostty → local tmux pane → local ssh → remote PTY → remote shellNow local tmux parses remote output before Ghostty does. Add remote tmux and there are three terminal-state owners in the path. When debugging, draw the actual process/PTY nesting rather than saying “the terminal.”
Ghostty is connected through a local PTY to a local ssh client. SSH creates an encrypted byte channel to remote sshd, which allocates a remote PTY and launches a remote shell or program. Keys travel from local hardware through Ghostty, the local PTY, SSH, and the remote PTY. Output travels back through the reverse route. Ghostty parses and renders locally. tmux can add another parser/state/composition layer on either side.
A remote sports feed often transports compressed audio/video. SSH terminal sessions transport terminal bytes, not rendered frames. The remote side normally does not decide the final font, glyph rasterization, or GPU output you see in Ghostty.