UAC - SSH Tasks

Overview

Universal Task to run a command or Universal Controller "data" script on a remote ssh server. 

Enables the execution of commands and scripts from the Universal Controller script library on a remote Unix. Linux, or Windows SSH server.  

  • The Universal Task will end with the exit code from the remote command / script.
  • Both stdout and stderr from the remote task are returned to the Universal Task's stdout. Stderr is used for messages from the Universal Task itself.
  • Requires Python 3.6 or higher with the ssh2-python module installed. Tested with the Universal Agent bundled Python distribution.
  • You can set different log-levels for the Universal task, providing you more or less information to suit your needs.

An SSH task is unable to provide the following functionality that is available for tasks that execute on a Universal Agent.

  • No Agent visibility, status, or alerting is available
  • The remote command or script cannot be cancelled from the controller UI, cancelling the SSH task will only cancel the Universal Task Python script that is initiating the SSH session
  • No fault tolerant functionality
  • No clustering, load balancing, or broadcast functionality 

The Universal Task performs the following:

  1. Connects to the Remote SSH Server
  2. Authenticates to the Remote SSH  Server via Userid and Password or SSH Public Key.
  3. Execute Command on SSH Server or Transfer UC Data Script to Remote SSH Server and Execute.  

Example Output


Universal Task Details Fields


Field Label

Description

Example

Required

Remote SSH Server

Specify the Hostname for the Remote SSH Server

mysshserver

Y

Remote SSH Port

Specify the SSH port for the Remote SSH Server

22

Y

Remote SSH Credential

Select the Credential Definition to access the Remote SSH Server.  

If the Credential specifies a Key Location, Public Key Authentication will be performed.


Y

Command or Script 

Specify whether to execute a Command, or Transfer and Execute a UC Data Script.


Y

Command

Command To be Executed on the Remote SSH Server

ls -la

Y (If Command or Script = Command)

Script

UC Data Script to be transferred and Executed on the Remote SSH server


Y (If Command or Script = Script)