Running command transparently over ssh
- by jnsg
By transparently I mean forwarding of:
stdin, stdout and stderr
standard signals (SIGHUP or SIGINT would be great for a start)
As an example, consider these invocations of a (pointless) local and remote command:
$ `cat - > /dev/null; sleep 10` < /local/file
$ ssh user@host "cat - > /dev/null; sleep 10" < /local/file
I can interrupt the first one with ^C just fine. But if I try this during the second one it only affects ssh, leaving the command running on the remote server if cat has already finished.
I know about launching sshwith -t, but this way I can't send data via stdin. Is this possible with ssh alone at all?