Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cat SomePythonScript.py | ssh remote_machine 'cat - | python'
- from subprocess import PIPE , Popen
- p1 = Popen(["cat ", "SomePythonScript.py"], stdout=PIPE)
- p2 = Popen(["remote_machine"], stdin=p1.stdout, stdout=PIPE)
- p3 = Popen(["cat -", "python"], stdin=p2.stdout, stdout=PIPE)
- p1.stdout.close()
- p2.stdout.close()
- output = p3.communicate()[0]
- from subprocess import PIPE , Popen
- p1 = Popen([["cat", "SomePythonScript.py"], stdout=PIPE)
- p2 = Popen(["remote_machine","cat", "- python"], stdin=p1.stdout, stdout=PIPE)
- p1.stdout.close()
- output = p2.communicate()[0]
- from subprocess import PIPE , Popen
- p1 = Popen(["cat", "SomePythonScript.py"], stdout=PIPE)
- p2 = Popen(["ssh", "remote_machine", "cat - | python"], stdin=p1.stdout, stdout=PIPE)
- p1.stdout.close()
- output = p2.communicate()[0]
Add Comment
Please, Sign In to add comment