Overview
This node enables executing commands and transferring files over SSH (Secure Shell) protocol. It supports connecting to remote servers either by using stored credentials or by specifying connection parameters dynamically. Authentication can be done via password or private key.
Common scenarios where this node is useful include:
- Automating remote server management tasks by running shell commands.
- Uploading files to a remote server for deployment or backup.
- Downloading files from a remote server for processing or archiving.
Practical examples:
- Running a script on a Linux server to gather system metrics.
- Uploading a configuration file to a remote device before restarting a service.
- Downloading log files from a remote machine for analysis.
Properties
| Name | Meaning |
|---|---|
| Connection Type | Choose between using stored credentials ("Credentials") or specifying connection details dynamically ("Dynamic Parameters"). |
| Authentication | Select authentication method: "Password" or "Private Key". |
| Host | Hostname or IP address of the SSH server (required if using dynamic parameters). |
| Port | Port number of the SSH server, default is 22 (required if using dynamic parameters). |
| Username | Username for SSH authentication (required if using dynamic parameters). |
| Password | Password for SSH authentication (required if using dynamic parameters and password authentication). |
| Private Key | Private key string for SSH authentication (required if using dynamic parameters and private key authentication). |
| Passphrase | Passphrase for the private key, if applicable (used with private key authentication). |
Note: The above properties are shown depending on the selected connection type and authentication method.
Output
The output depends on the chosen resource and operation:
Command Execution (
resource: command,operation: execute):- Outputs an array of JSON objects containing the result of the executed command.
- Each item includes fields such as
stdoutandstderrrepresenting the command output and error output respectively.
File Download (
resource: file,operation: download):- Outputs the original input items enriched with binary data containing the downloaded file.
- The binary data is accessible under the specified binary property name.
- The binary data includes the file content and metadata like filename.
File Upload (
resource: file,operation: upload):- Outputs JSON objects indicating success status for each uploaded file.
If binary data is involved (upload/download), it represents the file contents transferred over SSH.
Dependencies
- Requires an SSH server accessible with provided credentials.
- Uses an SSH client library internally to establish connections and perform operations.
- For private key authentication, the private key must be properly formatted.
- Temporary files are used during file upload/download operations.
- No additional external services are required beyond the SSH server.
Troubleshooting
- Connection failures: Errors like "SSH connection failed" usually indicate incorrect host, port, username, password/private key, or network issues. Verify all connection parameters and network accessibility.
- Invalid path errors: Paths starting with "
" but not "/", e.g., "user/path", are rejected. Use absolute paths or "/" to represent home directory. - Authentication errors: Ensure correct authentication method is selected and credentials are valid.
- File transfer errors: Check that the specified file paths exist and have proper permissions on the remote server.
- Binary data issues: When uploading, ensure the input binary field exists and contains valid data.
- Continue on Fail: If enabled, errors in individual items will not stop execution but return error messages per item.