We'd like to be able to have a flow where we can run a command(s) on a remote machine using SSH.
The machine we want to connect to is accepting SSH connections as we have tested this from the machine running Switch (a Mac using Terminal) to the remote machine (a Windows 10 pc).
We are guessing that we'd be able to use Execute Command to do this, but unsure as to how you would execute multiple commands in sequence i.e. login to the remote machine, run a command, then log off the machine.
Any help or ideas on how to do this would be appreciated.
Execute Command SSH
Re: Execute Command SSH
You should let the property "Command or path" of "Execute command" point to a shell script instead of to ssh itself. Do not forget to chmod +x the shell script!
Re: Execute Command SSH
And to create a shell script on the fly with variables you can use the app Execute Command Friend.
-
- Member
- Posts: 24
- Joined: Thu Dec 19, 2019 3:00 pm
Re: Execute Command SSH
Hi. Thanks for the replies. Will have a look into this in the next few days.
Appreciate the help with this one.
Appreciate the help with this one.
-
- Member
- Posts: 24
- Joined: Thu Dec 19, 2019 3:00 pm
Re: Execute Command SSH
An update to this and wondering if someone can assist.
I have managed to create a Shell script on the mac (a .sh file which I then CHMOD in terminal and then run). This executes correctly and runs the external program with arguments that I need it to.
If I copy the contents of the script file and use it in the Execute Command Friend flow element, it doesn't do anything. I get no errors, it just seems to do nothing, so slightly confused as to how to proceed.
Any help is appreciated as banging my head against the wall now!
Matt
I have managed to create a Shell script on the mac (a .sh file which I then CHMOD in terminal and then run). This executes correctly and runs the external program with arguments that I need it to.
If I copy the contents of the script file and use it in the Execute Command Friend flow element, it doesn't do anything. I get no errors, it just seems to do nothing, so slightly confused as to how to proceed.
Any help is appreciated as banging my head against the wall now!
Matt
-
- Member
- Posts: 24
- Joined: Thu Dec 19, 2019 3:00 pm
Re: Execute Command SSH
I have just realised that Execute Command just outputs a SH file for me to actually execute.
My next question then is .... how do I get the Execute Command element to run this?
Not sure what to put in the "Command or Path" and the "Arguments" sections.
My next question then is .... how do I get the Execute Command element to run this?
Not sure what to put in the "Command or Path" and the "Arguments" sections.
-
- Member
- Posts: 24
- Joined: Thu Dec 19, 2019 3:00 pm
Re: Execute Command SSH
Have sorted this now by specifying the absolute path to the generated script file and it's worked now.
Re: Execute Command SSH
Yes that's the way to do it.
-
- Member
- Posts: 24
- Joined: Thu Dec 19, 2019 3:00 pm