SSH Engine state in Circuit | Qntrl | Circuit | Online Help | Execute commands in a remote Linux or Unix machine

SSH Engine

SSH Engine state is configured to connect to a client's machine or network and remotely execute commands or scripts on the client's Linux/UNIX operating system.

 

Prerequisite

For more details about the SSH module in Bridge, the keys, and its description, click here.


Example Use Case: In the employee onboarding scenario, when it comes to the employee asset allocation process, the system administrator is responsible for installing the operating system on the assigned employee systems. To facilitate this, the SSH Engine state can be utilized specifically for LINUX machines. It enables the connection to the employee's machine and the execution of remote commands for OS installation.

Builder View

  For associating an SSH Engine state to a circuit in builder view:

  1. Drag and drop the SSH Engine state from the left pane into your circuit, or click an existing SSH Engine state to edit its configuration.

  2. In the Configuration, update the common state field attributes.

  3. Bridge/Cluster ID: Select the appropriate bridge or cluster from the drop-down list to execute the task. 

  4. Under the Add Configuration section, fill in the following fields:

    1. Credential ID -  Choose from the list of SSH credentials available in the Credentials module. These credentials are used to authenticate and connect to the target machine.

    2. Host - Specify the hostname of the machine in which the shell command has to be executed. Enter the host name as localhost, if the shell command is executed on the same Bridge-installed machine.

    3. Execution Type: Choose between the below two options:

      1. Command Directly enter the shell command to be executed. You can also include a reference to a script file available on the host machine. To create a new script file, refer to Scripts.

      2. FileIf executing a script file, configure the following: 

        1. Script Type: Choose either Shell Script or Bash Script.

        2. Script ID: Select a script maintained in Qntrl’s Scripts module for easy reference and reuse.

        3. Script File Path: Alternatively, you can enter the direct file path to the script on your machine.

  1. In Input / Output, enter the required paths. Learn more about I/O paths.

NotesUse the Script ID option when you want to fetch scripts maintained in Qntrl for ease of management. Use the Script File Path when the script is stored securely on the server or used at the system level.


Code view

 In Code View, the JSON to execute a shell command and perform an SSH task in Circuit is given below:
{ "Linux OS Installation": { "type": "ssh_engine", "next": "Licence Key Activation-Linux", "bridge_id": "bridge-1368_1", "payload": { "execution_type": "file", "credential_id": "ssh_cred_4", "host": "localhost", "command": "display.sh" } } }




NextPowerShell Task Engine