I would like to connect a remote machine and run background script in that machine from python.
I tried:
os.system("ssh [email protected] \' nohup script.sh & \')
But it seems not working. And if I put nohup in script.sh, and simply run
os.system("ssh [email protected] \' script.sh \'")
The nohup command would not work in either cases.
I'm confused why so, and is there anybody knows how to do background job from python or it's just impossible doing it this way?