MarketplaceStudioActivityConnection to SSH Server

Create your first automation in just a few minutes.Try Studio Web

Connection to SSH Server

Connection to SSH Server

by Internal Labs

Star

4

Activity

Downloads

10.2k

Syed Shahzad Hasan
Posted 6 years ago

Hi Sorin, I would like to know the possibility to SSH Command to use CD \abc\def

command, I tried but the result is wrong.

Sorin Calin
Posted 6 years ago ago

The current directory and other session information is not preserved between subsequent commands over the underlying SSH library, which might cause problems with the cd command. If that's not the issue, I'm afraid I cannot help you with this problem.

The code for the activity is also public on this GitHub repo so you can use it to debug the problem. https://github.com/sorincalin/UiPathTeam.SSHConnector.Activities

Mauro Okamoto
Posted 6 years ago

Hi Sorin,

I would like to know the possibilty to SSH to a remote LINUX server (B) but passing thought server (A) using UiPah Studio. Objective is reach server (B) in order to get linux commands output data from LINUX server (B).

Uipath Studio —> Linux Server (A) —> Linux Server (B)

Tried to use “SSH Connect Scope” function with no success. Alternatives will be welcome.

Thanks !!!

Sorin Calin
Posted 6 years ago ago

Hi Mauro,

Unfortunately I haven't tested your scenario and I'm not sure what problems could be encountered. I know for a fact (and is written in the docs) that it's best to send multiple commands at once, as the session between the Run Command activity is not kept. You could try that or you could try to write a shell script on the Linux Server (A) that runs the command on Linux Server (B) and get the output of the script, rather than sending multiple complex commands via the Run Command Activity.

Hope this helps,

Sorin

Javier Caballero
Posted 6 years ago

Hello Sorin! thank you very much for this componend for SSH.

I have installed the package and tested it. I also used securestring for password but when I execute it I receive this error message:

Source: SSH Connect Scope

Message: No suitable authentication method found to complete authentication (publickey,keyboard-interactive).

Some idea about it?, could you please support me?

Thanks in advance

Sorin Calin
Posted 6 years ago ago

Hi Javier,

It seems that the server you are connecting to requires more than just the username and password. I found the following which I believe could solve your issue:

https://stackoverflow.com/questions/39071619/cannot-connect-to-mac-using-rencissh

The component I built is a simple wrapper over the SSH.NET library and if you'd need to change the code, you can find it publicly available here:

https://github.com/sorincalin/UiPathTeam.SSHConnector.Activities

Best regards,

Sorin

andres naranjo
Posted 6 years ago

Hi, I installed the package, but I'm not able to see it in Uipath. Can you help me with that?

Sorin Calin
Posted 6 years ago ago

Hi Andres. Once installed the activities in the package should be visible under UiPathTeam -> SSHConnector -> Activities. There is nothing different from other activity packages, so if you followed the steps described below, all should work fine:

https://docs.uipath.com/studio/docs/managing-activities-packages#section-installing-packages

If you are still having troubles installing packages, please reach out to our technical support:

https://www.uipath.com/company/contact-us/contact-technical-support

Best regards,

Sorin

himalaya patwal
Posted 6 years ago

hi team

how can i execute php scripts which are present in a remote server directory

i am able to connect through ssh connect scope activity but dont know how to use ssh run command activity.

thanks.

Sorin Calin
Posted 6 years ago ago

Hi,

You can find the documentation under the resources tab in the activity's page. Simply put inside the SSH Run Command activity the line/lines that you want to execute on the server where you connected as you would from a regular SSH console. Please note that if you want to run more commands, between the SSH Run Command calls, the context is not kept. See the section extracted from the documentation:

Multiple commands can be sent in a single call by separating them based on the server's operating system. For example on Unix systems:

"Command1 && Command2" - this will execute Command1 and will only execute Command2 if the former was successful 

"Command1; Command2" - this will execute Command1 and Command2 regardless of the result of Command1

Notes:

- in the SSH session, environment changes such as current directory will not be applied from one command to another. For such scenarios you will have to chain multiple commands as shown above.

Best regards,

Sorin

Rodrigo Gallo
Posted 6 years ago

Hi, could you help me, I am having problems to access to the SSH server (MobaXterm) it is sending the next error: Permission denied (password).

¿Why do you have the password in a string? because it is not allowing me to have a string and I convert it to a secure string?

¿What type of variable are: exitStatus, output, errorOutput

Sorin Calin
Posted 6 years ago ago

Hi,

You can switch from String to SecureString and vice-versa using the NetworkCredential class in .NET like in the following examples:

stringPassword = new System.Net.NetworkCredential("", secureStringPassword).Password

secureStringPassword = new System.Net.NetworkCredential("", stringPassword).SecurePassword

Regarding the output variable types, you can see for any activity the argument expected types by hovering with the mouse over them. In this case Error and Result are Strings and the ExitStatus is an Int.

I hope this helps.

Best regards,

Sorin

Hernan Perez
Posted 6 years ago

I can to resolve error with secure password, I tried this form in a new variable:

(new System.Net.NetworkCredential("", pass)).SecurePassword

Now when run the process show this message Server response does not contain SSH protocol identification.

Will I need to set any aditional process?

Thanks for your support.

Sorin Calin
Posted 6 years ago ago

It seems there is an error that happens sometimes in the underlying library:

https://stackoverflow.com/questions/45898487/renci-sshnet-server-response-does-not-contain-ssh-protocol-identification

You might need to retry the connect part a few times. You can do that with some VB code as explained in the documentation which you can find under the resources tab. An extract from it:

// Creating the client and performing the connection

mySSHClient = New SshClient(host, user, pass)

mySSHClient.Connect()

// Now the client can be used in the SSH Run Command activity....

// The client is disconnected and disposed

mySSHClient.Disconnect()

mySSHClient.Dispose()

The code for the activity is also public on my GitHub repo:

https://github.com/sorincalin/UiPathTeam.SSHConnector.Activities

Hernan Perez
Posted 6 years ago

I have the next error, when used this component. Show me Server response does not contain SSH protocol identification. I have to convert the string pass to Secure String, maybe you can to help me how I can to resolve.

Thanks for your support

Sorin Calin
Posted 6 years ago ago

Hi,

The NetworkCredential solution is the way to go.

string password = new System.Net.NetworkCredential(string.Empty, securePassword).Password;

Are you sure you are getting the password as SecureString? What is the exact error you are getting.

Best regards,

Sorin

Ranjani r
Posted 6 years ago

Where can we specify enable username and password

Sorin Calin
Posted 6 years ago ago

Hi Ranjani,

Apologies for the late reply. If the issue still persists, please elaborate a bit more about your scenario and problem as I'm not sure what you are referring to.

Best regards,

Sorin

Vinodkumar V
Posted 6 years ago

even i am not able to view this activity after installing it from Manage Packages

Sorin Calin
Posted 6 years ago ago

I've tested it with 2018.3 and 2018.4 versions of Studio and for me it's working fine. Do you experience the same issue with other packages downloaded from Go! ?

sri ram
Posted 6 years ago

When i try to add the package it's not shown

Sorin Calin
Posted 6 years ago ago

I've tested it with 2018.3 and 2018.4 versions of Studio and for me it's working fine. Do you experience the same issue with other packages downloaded from Go! ?

Publisher

Internal Labs

Visit publisher's page

License & Privacy

License Agreement

Privacy Terms

Technical

Version

2.1.2

Updated

January 9, 2024

Works with

Studio: 21.10 - 23.10

Certification

Silver Certified

Support

UiPath Community Support

Resources