I have to orchestrate some script tasks among few Linux machines and a Windows machine. ssh works fine for linux machines suing below:
ssh mysuser@targetLinuxmachine "python '/pathtomyscript/myscript.py' &"
But the same method doesn't work as background task when I'm sending the command to an Windows machine. On the Windows machine, I have ssh server running and the ssh connection itself is working. RSA public key has been inserted too. In fact below commands runs:
ssh -n -f mysuer@targetwinmachine "python 'C:\Windowspath\myscript.py -someswitch parameter' &"
however executing the command in bash will take my terminal to windows console and doesn't allow me to run it as a back ground task. I guess "&" is not working on windows to run the command as a background task.
How can I run the equivalent script on a Windows machine as a background task?