# SSH Targets

## Use Cases

* Ability to execute a command over SSH and collect logs.
* Ability to configure SSH keys to be used to execute commands on target VMs. (Private keys provided to Fylamynt are securely managed.)

## To Configure an SSH Target in Fylamynt

* Navigate to **Settings** > **Resources** > **SSH Targets**
* Click **Manage Resource** to create and configure a new integration instance
* Click on **Add New**

Details needed to set up an **SSH Target Instance** in **Fylamynt**:

| **Parameters**  | **Description**                                              | **Required** |
| --------------- | ------------------------------------------------------------ | ------------ |
| Target Name     | Unique human readable name for resource                      | True         |
| Host Identifier | Identifier to target machine such as (hostname, public IPv4) | True         |
| Private Key     | Private RSA key to run command without username/password     | True         |

Follow the steps listed below to get the desired parameters to enter in **Fylamynt**

* Target Name parameter is the unique human readable name for resource, any string could be provided, Since this is unique identifier 2 resources can not have the same target name
* Host Identifier parameter is needed to communicate with your target, generally this is either a **IPv4** or **Domain Name**
* Priavte Key this parameter is needed for authentication / authorization, this is a Private RSA Key

![](https://2168485084-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXYvxfYq9m2JdKqaCdk%2F-MbNygEFBCo51CiT1qOw%2F-MbgxjMITmIInSa-3g8Y%2Fimage.png?alt=media\&token=f702e950-bdbc-4d46-9e0a-b3833c814b90)

## Integration Actions <a href="#integration-actions" id="integration-actions"></a>

You can add these actions in Fylamynt workflow builder, as part of your workflow.

1. [SSH Execute](#ssh-execute)

### SSH Execute

Integration node to run SSH Execute Template

#### **Input**

| **Parameter Name** | **Description**                                   | **Required** |
| ------------------ | ------------------------------------------------- | ------------ |
| alias              | AWS assume role alias                             | True         |
| target\_name       | Template Id of configured CloudFormation resource | True         |
| user\_name         | Username, against which command would be executed | True         |
| command            | Command to be executed                            | True         |
| bucket\_name       | S3 bucket name to store logs                      | True         |

**Note:** Make sure to add correct target\_name (which has been configured from Settings Page)

#### **Output**

| **Parameter Name** | **Type** | **Description**                     |
| ------------------ | -------- | ----------------------------------- |
| execution\_status  | String   | Status of run (ie: S\_OK / E\_FAIL) |
| result             | String   | SSH command execution result        |

#### Action Example

![](https://2168485084-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXYvxfYq9m2JdKqaCdk%2F-MbNygEFBCo51CiT1qOw%2F-MbgxmdcHh_aj-bjf1tj%2Fimage.png?alt=media\&token=2b5be3fa-2297-447a-9285-e7a2529d1596)
