Skip to content

SSH (Secure Shell)

The ssh task block consists of an input and success and failed outputs. The parameters for this block are the SSH contract, the command to be run on the remote machine, and a variable to place the result into.


If the task block is triggered the ssh contract will be used to create a secure SSH connection and when the connection is established the requested command will be executed on the remote machine. The returned text of he remote command will be put into a variable and the SSH session will be stopped.

Keep in mind that the returned result will be a standard plain text. There are many task blocks that can be used to extract information from the returned text.

Examples

Here is a simple example of a mission that uses an SSH block. In this example the contract ssh is used to connect to the remote machine. The standard "df" command is used to get the storage usage on the remote machine and the result is placed into the variable var1. If the SSH command was successful then variable var1 will be written to the mission log. If the ssh command was not successful then ssh failed will be written to the mission log.


Copy / Settings / Docs

Each task block has three buttons named Copy, Settings, and Help.

  • Copy: This will duplicate the task block with all the current settings.
  • Settings: Settings will show a dialog that allows some added configuration for the block
    • Note: This allows you to add a text note for the current block. This note will appear in the log file if the Block Loggin option is enabled.
    • Transition Out Time: Each block can specify a delay in milliseconds that it will wait after an output trigger is activated. This feature is generally not used but is avilable for more granular flow control of the mission if needed.
    • Block Logging: If this is enabled then the internal logging of the block is turned on and will be sent to the mission log. Each block has different amounts of internal logging which can make mission logs become large in some cases. Users generally do not enable this feature because of the limits to data storage.

Other