Is it possible to stream the output of a program that is being executed via ssh?
Example program (test.py on remote):
import time
while True:
print time.time()
time.sleep(1)
Command (local):
ssh name@remote 'python test.py'
Since the program never terminates, the output is not streamed; is this possible in some way?
Apparently, adding the -t option to the ssh command works. It flushes the stdout:
ssh -t name@remote 'python test.py'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With