Sandbox
ssh()
| Type | Description |
|---|---|
SandboxSshOps | SSH client and server helpers |
SandboxSshOps
connect()
| Type | Description |
|---|---|
SshClient | Native SSH client session |
connect_with()
| Name | Type | Description |
|---|---|---|
| f | FnOnce(SshClientOptionsBuilder) -> SshClientOptionsBuilder | Configure user, terminal, and SFTP support |
| Type | Description |
|---|---|
SshClient | Native SSH client session |
server()
| Type | Description |
|---|---|
SshServer | Reusable SSH server endpoint |
server_with()
| Name | Type | Description |
|---|---|---|
| f | FnOnce(SshServerOptionsBuilder) -> SshServerOptionsBuilder | Configure server options |
| Type | Description |
|---|---|
SshServer | Reusable SSH server endpoint |
SshClient
exec()
| Name | Type | Description |
|---|---|---|
| command | impl Into<String> | Command string sent through SSH |
| Type | Description |
|---|---|
SshOutput | Captured output and status |
exec_with()
| Name | Type | Description |
|---|---|---|
| command | impl Into<String> | Command string sent through SSH |
| f | FnOnce(SshExecOptionsBuilder) -> SshExecOptionsBuilder | Configure exec options |
| Type | Description |
|---|---|
SshOutput | Captured output and status |
attach()
| Type | Description |
|---|---|
i32 | Exit code |
attach_with()
| Name | Type | Description |
|---|---|---|
| f | FnOnce(SshAttachOptionsBuilder) -> SshAttachOptionsBuilder | Configure terminal and detach keys |
| Type | Description |
|---|---|
i32 | Exit code |
sftp()
| Type | Description |
|---|---|
SftpClient | SFTP client session |
close()
SshServer
serve()
| Name | Type | Description |
|---|---|---|
| stream | S | Ordered duplex SSH transport |
Types
SshOutput
| Field | Type | Description |
|---|---|---|
| status | i32 | Exit status code |
| stdout | Bytes | Captured stdout bytes |
| stderr | Bytes | Captured stderr bytes |
SftpClient
Alias forrussh_sftp::client::SftpSession.
SshClientOptionsBuilder
| Method | Parameters | Description |
|---|---|---|
| user() | impl Into<String> | SSH login user. Defaults to root |
| term() | impl Into<String> | Terminal name for interactive sessions |
| sftp() | bool | Enable or disable SFTP on the internal server |
SshExecOptionsBuilder
| Method | Parameters | Description |
|---|---|---|
| tty() | bool | Request a PTY for the exec channel |
SshAttachOptionsBuilder
| Method | Parameters | Description |
|---|---|---|
| term() | impl Into<String> | Terminal name for the shell |
| detach_keys() | impl Into<String> | Detach key sequence |
SshServerOptionsBuilder
| Method | Parameters | Description |
|---|---|---|
| host_key_path() | impl Into<PathBuf> | Override the host private key path |
| host_key() | PrivateKey | Use an in-memory host private key |
| authorized_keys_path() | impl Into<PathBuf> | Override the authorized-keys path |
| authorized_key() | impl Into<String> | Add one in-memory authorized public key |
| user() | impl Into<String> | Override the guest user used for exec requests |
| sftp() | bool | Enable or disable SFTP |