Skip to main content
See SSH for shell, remote command, and SFTP workflows.

msb ssh

Start a native SSH client session into a sandbox. With no remote command, this opens an interactive shell. With --, the remaining tokens are joined into the remote shell command.

msb ssh authorize

Add a public key to microsandbox’s SSH authorization file.
The default authorization file is <MSB_HOME>/ssh/authorized_keys, or ~/.microsandbox/ssh/authorized_keys when MSB_HOME is unset or empty. The file is created with private permissions.

msb ssh serve

Serve a sandbox over SSH for external OpenSSH, SFTP, local TCP forwarding, dynamic TCP forwarding, or ProxyCommand clients.
Listener mode accepts ordinary OpenSSH clients:
Forwarded TCP connections originate inside the guest through microsandbox’s agent. Sandbox network policy still applies, and guest loopback addresses refer to the sandbox, not the host. Reverse forwarding (-R) and stream-local forwarding are not supported. --stdio is for clients that spawn msb as a transport bridge:

msb ssh connect

Explicit form of msb ssh, with the same arguments and options.
All SSH commands inherit ssh.inactivity_timeout_secs from user configuration when neither timeout flag is present. The built-in default is 10 minutes. A managed timeout takes precedence over both flags, including --no-inactivity-timeout, for local and cloud sessions.

SSH state

When MSB_HOME is unset or empty, <MSB_HOME> is ~/.microsandbox.