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.
| Argument | Description |
|---|---|
sandbox | Sandbox name, up to 128 UTF-8 bytes |
--name NAME | Explicit sandbox name, up to 128 UTF-8 bytes; useful when the name collides with serve, authorize, or help |
-- COMMAND... | Remote command to run through the sandbox shell |
msb ssh authorize
Add a public key to microsandbox’s SSH authorization file.| Flag | Description |
|---|---|
--file PATH | Read one public key from a file |
--key KEY | Read one public key from the flag value |
--stdin | Read one public key from stdin |
<MSB_HOME>/ssh/authorized_keys, or ~/.microsandbox/ssh/authorized_keys when MSB_HOME is unset. 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, orProxyCommand clients.
| Flag | Description |
|---|---|
--host HOST | Listener host. Defaults to 127.0.0.1 |
--port PORT | Listener port. Defaults to 2222 |
--stdio | Serve one SSH transport over stdin/stdout for OpenSSH ProxyCommand |
-R) and stream-local forwarding are not supported.
--stdio is for clients that spawn msb as a transport bridge:
msb ssh connect
Explicit subcommand form for native SSH client sessions.| Argument | Description |
|---|---|
sandbox | Sandbox name, up to 128 UTF-8 bytes |
--name NAME | Explicit sandbox name, up to 128 UTF-8 bytes |
-- COMMAND... | Remote command to run through the sandbox shell |
SSH state
| Path | Purpose |
|---|---|
<sandbox-dir>/ssh/host_ed25519 | Per-sandbox SSH host private key, created on first serve |
<MSB_HOME>/ssh/authorized_keys | Public keys allowed to connect |
MSB_HOME is unset, <MSB_HOME> is ~/.microsandbox.