cancel
Showing results for 
Search instead for 
Did you mean: 

SSH.NET Asset Issue on Windows 2019 node

sastharpa
MVP

We are using the SSH.NET asset on a plethora of our production automations. All the automations are working fine on Windows10 nodes; however, the same process is failing on Windows 2019 with the error “Exception has been thrown by the target of an invocation”.

Note: I have placed the prerequisite dll “renci.sshnet.dll”. Also, the object SSH.Net has no issue on the code stage from the Windows 2019 nodes.

Asset: BluePrism Digital Exchange

 

 

Could you please kindly support on the issue.

VL Ganesh
Tech Arch RPA
#MVP
7 REPLIES 7

sastharpa
MVP

version: Renci 2020.0.2

Asset: BluePrism Digital Exchange

Could someone please advise/support on the issue?

VL Ganesh
Tech Arch RPA
#MVP

Hello @sastharpa 

That VBO hasn't been updated in a while, so it's likely an issue with the older version of the DLL and the inherent differences between Windows 10 and Windows Server 2019. You can try deploying one of the newer versions of the file renci.sshnet.dll from the NuGet page and see if that fixes the issue.

I'd start with the latest release which is 25.0.0. Download the NuGet package and change the file extension from ".nupkg" to ".zip". You'll be able to open the file as a regular zip archive at the point. I believe there's a folder labeled net462 under the lib folder. Grab the DLL from there, drop it in your BP Automate folder, and see if you still get the exception.

https://www.nuget.org/packages/SSH.NET/2025.0.0 

Cheers,
Eric

sastharpa
MVP

Hello @ewilson,

Thanks for your support & response. Please find the below my update.

1. I have tried the version you have suggested but found compiler error on the SshNet object.

Compiler error Cannot implicitly convert type 'System.Collections.Generic.IEnumerabe<Renci.Sshnet.Sftp.ISftpFile>' to 'System.Collections.Generic.IEnumerabe<Renci.Sshnet.Sftp.SftpFile>'. An explicit conversion exist (are you missing a cast?)

2. I have simulated on an isolated Windows 2019 nodes on Dev environment where the SshNet object worked with an existing Renci dll. 

I suspect the issue is due to some hardening on the production Windows 2019 node but unable to figure it out. I have gone throw the nuget ReadMe page and I see specific supported CIphers & Encryption methods..

 

 

 

VL Ganesh
Tech Arch RPA
#MVP

Dear @ewilson 

We are facing the issue now on Windows 10 node. We have cloned the working Windows 10 and created new nodes and noticed the SSH.NET object has failed with the error "Exception has been thrown by the target of an invocation"

VL Ganesh
Tech Arch RPA
#MVP

@sastharpa runtime errors related to target invocation are typically due to a corrupt or missing value in the Windows Registry. 

The error you received when using the newer DLL likely comes down to a change in the way the API is implemented, and it seems that should be a relatively easy fix. Based on the error message, this should just involve the addition of a direct cast.

Which specific action were you trying to run when you received that error?

Cheers,
Eric   

@ewilson 

Thanks for your response. I am using the following methods: Execute command and List files.

Kindly note that I have cloned the current working Windows 10 machine and created a new node, during this process our admin applied few security hardening (local policies etc.,) to the new machine. Does this object have any specific policy or registry setting/s to be applied?

Even though, the SSH.Net library is error-free(with the existing Renci dll) on the new Win10 or Win2019 nodes but the SSH commands a failing with the error "Exception has been thrown by the target of an invocation".

I am highly relying on this object as we have many time-consuming SSH automations needs to be deployed on various nodes to speed up the process. Note: We have procured 5 new licenses for this deployment.

VL Ganesh
Tech Arch RPA
#MVP

Hi @sastharpa 

I've run a few tests of the connector on my local machine (Windows 11 with BP v7.4) and things seem to work fine. What version of Blue Prism are you running? We'll try building a Win 10 environment and see if we can replicate what you're seeing.

Cheers,
Eric