"Feed input file" in Execute SSH command

Post your questions and help other users.

Moderator: Martin

Post Reply
jurkov
Posts: 8
Joined: 07 Jul 2016 20:06

"Feed input file" in Execute SSH command

Post by jurkov » 12 Jul 2017 08:51

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

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: "Feed input file" in Execute SSH command

Post by Martin » 15 Jul 2017 19:48

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

Post Reply