You click a saved remote connection and the app server itself opens SSH using ssh2.
[Browser UI]
|
| (1) WebSocket frames
v
[WebSSH Server]
|
| (2) SSH transport (ssh2)
v
[Remote Server]
|
v
[Remote Shell]UI -> WebSSH -> Remote
You open the shared local tab and run commands in a local PTY (node-pty). If you then type ssh ..., SSH happens inside that local shell.
[Browser UI]
|
| (1) WebSocket frames
v
[WebSSH Server]
|
| (2) Local PTY session
v
[Local Shell on Host]
|
| (3) optional: ssh user@host
v
[Remote Server]Local-only: UI -> WebSSH -> Local PTY Via SSH from local: UI -> WebSSH -> Local PTY -> Remote
If you run only local commands, there is no remote network latency. That typically feels very fast.
Local command latency ~= UI rendering + localhost WebSocket + local process scheduling Remote SSH latency ~= above + remote network RTT + remote server response
Same remote target + same command => often similar perceived speed (difference is mostly where SSH is initiated)