Skip to main content
See SSH for connection behavior.

Sandbox

sandbox.ssh_exec()

Run a command over SSH and collect its output. Managed settings take precedence over the supplied timeout. Ruby does not expose interactive SSH or SFTP sessions.

Parameters

commandString
Command to execute over SSH.
inactivity_timeoutNumeric
Optional timeout in seconds. Omit to inherit global configuration; use 0 to disable it.

Returns

Hash
Collected output and exit status, with string keys.

Result fields

”stdout”String
Standard output bytes
”stderr”String
Standard error bytes
”exit_code”Integer
Exit status
”success”Boolean
Whether the exit status is zero