Start a new topic
Answered

Help passing Paramters to tool

Hi, I'm trying to pass in my username/password for an ssh connection to WinSCP. I created the connection, and I created a "task" The task info currently is:


Command: 

C:\Program Files (x86)\WinSCP\WinSCP.exe


Arguments:

scp://$this.EffeciveUsername$:$this.EffectivePassword$@$URI$/


but it seems that it won't pass the connection information in when I right click > task, all I get is the URI. Any help is appreciated!


Thanks,

Jon


Best Answer

That worked! I believe it was the quotes around it causing all the drama! Might be worth stripping those out automatically in the future or something like that! Thanks for the help. 


Perhaps I am approaching this incorrectly, I'm trying to reproduce what you can do in mRemoteNG  > Right Click a connection > open a tool (where username/password/hostname) gets passed. 

Hi,


if you want to use the credentials from the context connection, you need to remove the this. - prefix. By default, all variables will be resolved from the context connection. To allow the task to use the credentials from the context connection, go to the Credentials page in the task properties and select "Use credentials from context connection".


Let me know if this helps.


Regards,

Stefan

So, I am now receiving "The Stub Received Bad Data"

image


Configuration:


image



image



Hi, anyone have any ideas?

 

Hi Jon,


I see you run the task in the user context of the credential. Can you try to uncheck that box and see if this works then? Also, it shouldn't be necessary to put the path to the command in double-quotes.


Let me know if this helps.


Regards,
Stefan

Answer

That worked! I believe it was the quotes around it causing all the drama! Might be worth stripping those out automatically in the future or something like that! Thanks for the help. 

Great to hear that. I will see if we can safely remove the double quotes in case we see some.


Regards,
Stefan

How do we pass the key. 

What do you mean by key? Can you post a sample of the command line you are using to pass the key?

Login or Signup to post a comment