SSH Command
Execute commands on remote server via SSH.
Opens an SSH session with a credential, runs one command on the remote host and returns its output and exit code.
How it works
- Resolves the config.
connection_idandcommandfall back to the same keys of the incoming payload; both are required. - Resolves the credential:
hostandport(default 22) from its config;username,password,privateKeyandpassphrasefrom its secret. - Connects, runs
commandin an exec channel and collects stdout and stderr until the channel closes. - Exit code 0 leaves through
outwith{ stdout, code, signal }; any other code througherrorwith{ stdout, stderr, code, signal }.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-check-disk",
"label": "Check disk usage",
"operator_slug": "io.ssh",
"operator_version": "1.0.0",
"config": {
"connection_id": "pi-credential-xxxx",
"command": "df -h /"
}
}{
"ok": true,
"data": {
"stdout": "Filesystem Size Used Avail Use%\n/dev/sda1 50G 21G 27G 44%\n",
"code": 0,
"signal": null
},
"port": "out"
}Configuration
-
connection_idstring Required -
Credential for the SSH target. Accepts credentials of type `basic-auth` (username + password + host), `certificate` (username + private key), or `object` (advanced SSH config).
-
commandstring Required -
Shell command to execute
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
connection_id - Accepts
basic-auth(username + password),certificate(username +privateKey, optionalpassphrase) orobjectcredentials, withhostandportin the config. A JSON value{ host, port, username, password, privateKey, passphrase }is accepted in place for local tests. -
command - Executed by the remote user's shell exactly as written after expressions are resolved.
Output ports
out default The remote command exited with code 0. stderr is not included on this port.
{
"stdout": "Filesystem Size Used Avail Use%\n/dev/sda1 50G 21G 27G 44%\n",
"code": 0,
"signal": null
}error The command exited non-zero (data is { stdout, stderr, code, signal }), or the connection, authentication or exec channel failed (data is { error }).
{
"stdout": "",
"stderr": "systemctl: unit not found\n",
"code": 5,
"signal": null
}In expressions
What a later node can read from this node's output with $("SSH Command").item.json.<path> (write your node's label instead of SSH Command). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("SSH Command").item.json.stdout | ||
$("SSH Command").item.json.code | ||
$("SSH Command").item.json.signal |
Errors
| Message | Port | Cause and fix |
|---|---|---|
All configured authentication methods failed | error | The server rejected the user, password or private key of the credential. |
Timed out while waiting for handshake | error | The host did not answer the SSH handshake. Check host, port and that the orchestrator can reach it. |
command is required | error | No command in the config nor in the incoming payload (connection_id is required is the equivalent for the credential). |
connection_id parece una cadena cruda pero no es JSON válido: <value> | error | connection_id starts with { or names a local host but is not valid JSON. Select a stored credential instead. |
Input contract
-
connection_idstring Required -
commandstring Required
Output contract
-
stdoutstring Optional -
codenumber Optional -
signalstring Optional
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "io.ssh",
"name": "SSH Command",
"category": "io",
"version": "1.0.0",
"description": "Execute commands on remote server via SSH.",
"capabilities": [
"ssh",
"infrastructure",
"linux"
],
"config_schema": {
"type": "object",
"properties": {
"connection_id": {
"type": "string",
"title": "SSH Credential",
"description": "Credential for the SSH target. Accepts credentials of type `basic-auth` (username + password + host), `certificate` (username + private key), or `object` (advanced SSH config).",
"ui_widget": "connection_picker",
"ui_options": {
"credential_types": [
"basic-auth",
"certificate",
"object"
],
"types": [
"ssh"
]
}
},
"command": {
"type": "string",
"description": "Shell command to execute"
}
},
"required": [
"connection_id",
"command"
]
},
"input_contract_schema": {
"type": "object",
"properties": {
"connection_id": {
"type": "string"
},
"command": {
"type": "string"
}
},
"required": [
"connection_id",
"command"
]
},
"output_contract_schema": {
"type": "object",
"properties": {
"stdout": {
"type": "string"
},
"code": {
"type": "number"
},
"signal": {
"type": "string"
}
}
},
"ports": [
{
"port_id": "out",
"label": "Output",
"description": "Command stdout",
"is_default": true,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "Command stderr or connection failure",
"is_default": false,
"supports_condition": false
}
],
"execution_mode": "async",
"required_resources": [],
"compatible_worker_pools": [
"standard-io",
"infra"
],
"tags": [
"ssh",
"terminal",
"bash"
],
"is_stateful": false,
"publisher": {
"identity": "org_link_loom",
"profile": {
"name": "Link Loom",
"verified": true,
"url": "https://me.veripass.com/link-loom",
"logo_url": null
}
}
}{
"type": "object",
"properties": {
"connection_id": {
"type": "string",
"title": "SSH Credential",
"description": "Credential for the SSH target. Accepts credentials of type `basic-auth` (username + password + host), `certificate` (username + private key), or `object` (advanced SSH config).",
"ui_widget": "connection_picker",
"ui_options": {
"credential_types": [
"basic-auth",
"certificate",
"object"
],
"types": [
"ssh"
]
}
},
"command": {
"type": "string",
"description": "Shell command to execute"
}
},
"required": [
"connection_id",
"command"
]
}{
"type": "object",
"properties": {
"connection_id": {
"type": "string"
},
"command": {
"type": "string"
}
},
"required": [
"connection_id",
"command"
]
}{
"type": "object",
"properties": {
"stdout": {
"type": "string"
},
"code": {
"type": "number"
},
"signal": {
"type": "string"
}
}
}[
{
"port_id": "out",
"label": "Output",
"description": "Command stdout",
"is_default": true,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "Command stderr or connection failure",
"is_default": false,
"supports_condition": false
}
]Execution
- Execution
async- Stateful
- No
- Credentials
- Resolved on the server from
connection_id; the secret never reaches the workflow. - Capabilities
sshinfrastructurelinux- Tags
sshterminalbash
Notes and limits
- No command timeout: a command that never ends keeps the node waiting. The library waits about 20 s for the handshake.
- No pseudo-terminal is allocated, so interactive commands (prompts,
sudoasking for a password) do not work. - One connection per run, closed when the command ends. No retries.
Reviewed against the orchestrator code · 31e874b · 2026-11-26