Connect HomeMarketplaceComponentsConnection to SSH Server

Connection to SSH Server

Custom Activity

Custom Activity, Finance & Accounting, Connection to SSH Server
Custom Activity

Updated: June 4th, 2020

Published: June 4th, 2020

Downloads: 328

Industry: Cross-Industry

Community Support

Connection to SSH Server

Custom Activity

Summary: 

Allows establishing an SSH connection with a remote server and sending commands to it

The package contains three custom activities that facilitate establishing an SSH connection (SSHConnectScopeActivity) and sending commands to an already opened connection (SSHRunCommandActivity & SSHRunShellCommandActivity).

Please note that SSHRunCommandActivity does not use a SSH Shell, so the context is not maintained betweent he commands. To maintain the session, you should utilize SSHRunShellCommandActivity

The package wraps the basic functionalities of the SSH.NET library https://www.nuget.org/packages/SSH.NET/. The output of the commands being sent is captured so that the developer can make use of it in the automation process.

In the automation process, the Robots need to interact with remote systems such as UNIX servers. Though sometimes achievable through UI interaction in graphical interface sharing protocols, this might not be the fastest or reliable way of working with the remote systems. In the UNIX world, SSH is the preferred network protocol for accessing such remote systems and the present activities allow unlock the full communication potential of the SSH protocol in the automation processes.

This version is not backwards compatible with the previous one! If you update to this, you will have to make some changes in the workflows that are using those activities!

Changes from the previous version:
- I've added support for sending commands over a SSH Shell which allows to maintain the context and session between commands.
- The above addition means that certain prompts need to be expected to know when the command is finished and the shell is again available for commands. Those can be described using Regex, depeding on the target SSH server. For example: "[a-zA-Z0-9_.-]*@[a-zA-Z0-9_.-]*:\~.*\$ $"
- There are 2 timeouts: SSH Timeout is the time to wait for a response from the SSH connection and the Timeout is the overall timeout of the activity, including the SSH Timeout.
- SSHRunShellCommand has it's own expected prompt property, as it can be different depending on what commands you are executing, so please consider using it if needed. By default, it will inherit the one from the SSH Connect Scope
- SSHRunShellCommand has a Check Exit Code property which will check if the result of the last command is 0. If not, it will throw an exception.

Details

Benefits

Useful for connecting and sending command to systems that expose an SSH endpoint. Extends the RPA scope outside the bounds of Windows based operating systems into the UNIX world.

Compatibility

Tested with UiPath 2018.2, 2018.4 & 2019.10

Dependencies

SSH.NET >= 2016.1.0

Resources

- HowToAddCustomActivity.docx
- Connection_to_SSH_Server_User_guide.docx

Licensing

By clicking download you agree to the following license.