The package contains three activities:
SSHConnectScopeActivity: establishes the connection to the remote SSS server. Authentication to the specified URL is done with a set of credentials and optionally via a proxy host with its own authentication. If an SSH Shell will be used, the Shell Expected Prompt is also required. The Shell Expected Prompt represent a Regex matching string against which the prompt will be validated to know when the welcome messages have been completely received and the SSH Shell can be used for the next commands. It exposes the SSH Client, Shell Stream and Shell Expected Prompt to the activities inside the scope.
SSHRunCommandActivity: executes commands through an active SSH Client. It outputs the text result and the exit code of the command. The SSH Client can be inferred from the parent Scope or created programmatically and passed specifically as an argument. As it does not use the Shell Stream, the context is not persistent between invocations of this activity. If persistence is needed, the commands need to be linked together (i.e.: using “;” between them) and sent through the same SSHRunCommandActivity
SSHRunShellCommandActivity: executes commands through an active Shell Stream. It outputs the text result of the command. It will infer the Shell Stream and the Shell Expected Prompt from the parent scope, but they can also be overridden with specific values. Optionally, it can also check the exit code of the command that was run by comparing the output result against 0. It will throw an exception if the output is not 0.
Please note all activities have 2 timeouts: the SSH Timeout which will be used just for waiting over the SSH Client and the Activity Timeout which is used for the total time the activity takes.
Updated 4 months ago