Streaming output of a remotely executed program via ssh

reinzor

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?

reinzor

Apparently, adding the -t option to the ssh command works. It flushes the stdout:

ssh -t name@remote 'python test.py'

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Run a program remotely using SSH, but show output on connected monitor

From Dev

How can I run a program remotely via SSH but display locally

From Dev

echo pwd remotely via ssh

From Dev

How to check if a cdrom is in the tray remotely (via ssh)?

From Dev

Launching programs remotely via SSH on Windows 7

From Dev

Execute a sudo NOPASSWD command remotely via SSH

From Dev

Some commands not working when executed via ssh while redirecting output locally

From Dev

Streaming execvp output via socket

From Dev

Streaming execvp output via socket

From Dev

How does Bash get the output of an executed program?

From Dev

Is it possible to execute commands remotely (ssh), through a Java program

From Dev

Problems using scala to remotely issue commands via ssh

From Dev

how to check if python script is being called remotely via ssh

From Dev

why does tee refuse to work when launched remotely via ssh?

From Dev

why does tee refuse to work when launched remotely via ssh?

From Dev

How do I remotely edit files via ssh?

From Dev

How to enable remote access for another account on Mac remotely via SSH?

From Dev

Pipe two files to bash, and run remotely via ssh

From Dev

How can I startx and have it run a script remotely via SSH?

From Dev

How could a reverse SSH tunnel be instantiated remotely via the web?

From Dev

How to run MySQL script file remotely via ssh?

From Dev

How can I configure vnc-server remotely via SSH

From Dev

How to see the output of a query which is executed remotely from mysql command line tool?

From Dev

ssh-keyscan returns empty output, when executed several times

From Dev

Command executed via ssh does not return proper return code

From Dev

start program via SSH as different user

From Dev

Streaming wrapper around program that writes to multiple output files

From Dev

Monitor console output via ssh in python

From Dev

capturing output of vncserver execution via SSH

Related Related

  1. 1

    Run a program remotely using SSH, but show output on connected monitor

  2. 2

    How can I run a program remotely via SSH but display locally

  3. 3

    echo pwd remotely via ssh

  4. 4

    How to check if a cdrom is in the tray remotely (via ssh)?

  5. 5

    Launching programs remotely via SSH on Windows 7

  6. 6

    Execute a sudo NOPASSWD command remotely via SSH

  7. 7

    Some commands not working when executed via ssh while redirecting output locally

  8. 8

    Streaming execvp output via socket

  9. 9

    Streaming execvp output via socket

  10. 10

    How does Bash get the output of an executed program?

  11. 11

    Is it possible to execute commands remotely (ssh), through a Java program

  12. 12

    Problems using scala to remotely issue commands via ssh

  13. 13

    how to check if python script is being called remotely via ssh

  14. 14

    why does tee refuse to work when launched remotely via ssh?

  15. 15

    why does tee refuse to work when launched remotely via ssh?

  16. 16

    How do I remotely edit files via ssh?

  17. 17

    How to enable remote access for another account on Mac remotely via SSH?

  18. 18

    Pipe two files to bash, and run remotely via ssh

  19. 19

    How can I startx and have it run a script remotely via SSH?

  20. 20

    How could a reverse SSH tunnel be instantiated remotely via the web?

  21. 21

    How to run MySQL script file remotely via ssh?

  22. 22

    How can I configure vnc-server remotely via SSH

  23. 23

    How to see the output of a query which is executed remotely from mysql command line tool?

  24. 24

    ssh-keyscan returns empty output, when executed several times

  25. 25

    Command executed via ssh does not return proper return code

  26. 26

    start program via SSH as different user

  27. 27

    Streaming wrapper around program that writes to multiple output files

  28. 28

    Monitor console output via ssh in python

  29. 29

    capturing output of vncserver execution via SSH

HotTag

Archive