Framework
Running Sessions
Open a remote command channel or attach the local terminal to an interactive shell.
Overview
SSHClient uses separate handlers for non-interactive and interactive sessions. BufferingExecHandler collects stdout, stderr, and exit status so executeCommand(_:) can return a single CommandResult. InteractiveShellHandler wires the child channel to the local terminal and requests a pseudo-terminal before starting the remote shell.
Both flows use half-closure so the client can continue reading trailing output after the remote side has indicated completion. This matters for commands that send exit-status before the final data frame, and for interactive sessions that need stdout and stderr to drain cleanly before the channel closes.
Topics
Session APIs
Execute a non-interactive command on the remote server.
Start an interactive remote shell using a pseudo-terminal request.
See Also
Interactive and Non-Interactive Sessions
Establish the underlying SSH connection if one is not already open.
Execute a non-interactive command on the remote server.
Start an interactive remote shell using a pseudo-terminal request.