Page 1 of 1

"Feed input file" in Execute SSH command

Posted: 12 Jul 2017 08:51
by jurkov
Hello there.
I want to execute command from .txt file.
What format I have to write it in this file?

For example ls?
I have tried:
"ls"
{ls}
...
When I write ls in command (not in Feed input file) it works.
Thanks. Juraj

Re: "Feed input file" in Execute SSH command

Posted: 15 Jul 2017 19:48
by Martin
Hi,

Feed input file is used to pass an input file to the command that is executed on the remote via stdin (cat file | ssh user@server command) so it would feed the contents of file to the command. You could try to do something like this:
Command: bash
Feed input file: commands.txt

Where the file commands.txt contains your script. I'm not sure if there is any drawback using this method. Alternatively you could upload your script to the machine, execute the script via SSH and then delete the file again.

Regards,
Martin