Relogging in SSH in the same session

Hi,

I need to login into SSH. I use here SSH Scope activity. Then I need to relog in the same session. I wanted to do it with Command SSH activity, but after sudo when it asks me for password and a command with password doesnt work. I tried to do something like echo “PASSWORD” | sudo -u USER, but it doesnt work either.
Does anyone know how to do this?

Thanks for help,
Marek :slight_smile:

Hi @Marek_Matuszak

Could you let us know how you are currently trying to achieve it in UiPath Studio?
(including the configuration of your activities and from which packages they come from)

Hi,

I will not include my project because it has lots of confident data but I can tell You what I use.
I use here activities written by UiPath Team:
image

I do following steps:

  1. Log into SSH using SSH Connect Scope
  2. Put linux command(sudo etc.) to relog into another user using SSH Run Command
  3. Linux asks me to give password for this user. With SSH Run Command it is not possible. I think linux blocks writing password with bots/scripts.

Should I write a custom activity?(i’m c# basic) Or is it somehow possible to write password into the console with the activities i currently have.

Hi Marek. Please check the latest version of the SSH Connection activity package which includes the SSHRunShellCommandActivity that might work better for this application. Information about this can be found in the description on Marketplace. Let us know how it goes.

1 Like