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
"Feed input file" in Execute SSH command
Moderator: Martin
Re: "Feed input file" in Execute SSH command
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
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