SSH Tool
Execute commands and scripts on remote hosts via SSH.
Tool ID
ssh
Credential Required
Yes — SSH server connection.
Credential Properties
| Property | Type | Default | Description |
|---|---|---|---|
server |
string | — | Required. SSH server hostname or IP |
port |
integer | 22 |
SSH port |
login |
string | — | Required. Username |
password |
string | — | Password |
publicKeyAuth |
boolean | false |
Use public key authentication |
privateKeyPath |
string | — | Path to private key file (Ed25519, RSA, ECDSA) |
Authentication: password OR public key. When publicKeyAuth=true, uses privateKeyPath instead of password.
Operations
1. execute — Run command or script
Executes a shell command or multi-line script on the remote host.
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
script |
string | — | Required. Shell command or multi-line script |
outputFile |
string | — | Local file to capture stdout (optional) |
errorText |
string | — | Text that indicates an error if found in output (optional) |
successCode |
integer | 0 |
Exit code that means success |
warningCode |
integer | -1 |
Exit code that means warning (-1 = disabled) |
timeoutSeconds |
integer | 900 |
Max execution time (0 = unlimited) |
Published Outputs:
- exitCode — remote process exit code
- stdout — full stdout content
- stderr — full stderr content (if any)
- Any properties set via ##intouch[set name=X value=Y] markers in script output
Property Markers: Scripts can publish values back to InTouch by printing:
##intouch[set name=myVar value=myValue]
These become published properties available to subsequent tasks.
Exit Code Evaluation:
- exitCode == successCode → SUCCESS
- exitCode == warningCode → WARNING
- anything else → FAILED
- errorText found in stdout → FAILED (regardless of exit code)
Killable
Yes — closes the SSH channel and session.
Technology
Apache MINA SSHD — supports modern ciphers: curve25519-sha256, chacha20-poly1305, aes256-gcm, Ed25519.
Chaining Patterns
- SSH → SQL — run a remote script that generates data, then import into database
- SSH → Email — run a health check, email the results
- FTP → SSH — upload a script, then execute it remotely
- SSH → File Management — execute a remote script that outputs to a shared filesystem, then manage the files locally
Error Handling
- Connection timeout: 30 seconds
- Script timeout: configurable (default 900s), returns FAILED on timeout
- Authentication failure: returns FAILED with error message
- errorText detection: scans stdout for the specified string
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
exitCodestderrstdout