SSH
The SSH connector is capable of running SSH commands.
Prerequisites
The SSH asset requires a host IP, username, and password.
Capabilities
The SSH connector has the following capabilities:
- Run Command(s)
- Get Files
- Put Files
Configurations
SSH Authentication
SSH Authentication
Configuration Parameters
Parameter | Description | Type | Required |
|---|---|---|---|
host | Address of the SSH server | string | Required |
port | Port | integer | Optional |
username | Username | string | Required |
password | Password | string | Required |
Actions
Run Command
Runs a command on an SSH server
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
command | string | Required | Parameter for Run Command |
Input Example
{"command":"ls -la"}
Output
Parameter | Type | Description |
|---|---|---|
status_code | object | HTTP status code of the response |
reason | string | Response reason phrase |
response | object | Output field: response |
response.command | string | Output field: response.command |
response.stdout | string | Output field: response.stdout |
response.stderr | string | Output field: response.stderr |
response.exit_code | number | Output field: response.exit_code |
Output Example
{"status_code":null,"response_headers":null,"reason":"OK","response":{"command":"ls -la","stdout":"total 36\ndrwxr-xr-x 5 serviceacct serviceacct 4096 Jan 10 09:51 .\ndrwxr-xr-x 4 r...","stderr":"","exit_code":0}}
Get File
Get a file
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
remotepath | string | Required | Parameter for Get File |
Input Example
{"remotepath":"/home/serviceacct/connector_test.txt"}
Output
Parameter | Type | Description |
|---|---|---|
file | object | File |
file.filename | string | Name of the resource |
file.file_data | string | Response data |
Output Example
{"file":{"filename":"Example Name","file_data":"string"}}
Put File
Put a file
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
form_fields | object | Required | Parameter for Put File |
form_fields.files | array | Optional | Parameter for Put File |
form_fields.files.file | string | Optional | Parameter for Put File |
form_fields.files.file_name | string | Optional | Name of the resource |
remotepath | string | Required | Parameter for Put File |
Input Example
{"remotepath":"/home/serviceacct/test_file.txt"}
Output
Parameter | Type | Description |
|---|---|---|
status_code | object | HTTP status code of the response |
reason | string | Response reason phrase |
response | object | Output field: response |
response.success | boolean | Whether the operation was successful |
Output Example
{"status_code":null,"response_headers":null,"reason":"OK","response":{"success":true}}
Response Headers
Header | Description | Example |
|---|---|---|
Content-Type | The media type of the resource | application/json |
Date | The date and time at which the message was originated | Thu, 01 Jan 2024 00:00:00 GMT |