Documentation
¶
Index ¶
Constants ¶
const DisconnectExitCode = 255
DisconnectExitCode is the exit status reported to the connecting client when a PTY client is force-detached (keepalive timeout, lost connection, or slow consumer) rather than the shell exiting. A non-zero status makes the client's session.Wait return an error so it treats the result as a dropped connection — not a clean shell exit — and therefore does not prompt to shut down the sandbox. It is unambiguous: a genuine shell exit always reports 0, so the client can match this code to recognize a disconnect. 255 follows the SSH convention for connection-level errors.
Variables ¶
This section is empty.
Functions ¶
func ShellEscape ¶
ShellEscape quotes a string for safe transmission over SSH wire protocol.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps a charmbracelet/ssh server with public key authentication.
func NewServer ¶
NewServer creates a new SSH server that authenticates using the given authorized key and presents the given host key.