I haven't tried this but fabric looks encouraging: >From >http://docs.fabfile.org/en/latest/api/core/operations.html#fabric.operations.run
fabric.operations.run(*args, **kwargs) Run a shell command on a remote host. ... Any text entered in your local terminal will be forwarded to the remote program as it runs, thus allowing you to interact with password or other prompts naturally ... You may pass pty=False to forego creation of a pseudo-terminal on the remote end in case the presence of one causes problems for the command in question. Laura -- https://mail.python.org/mailman/listinfo/python-list