3
1
I have a remote machine with a Linux binary that accepts a number of arguments and a text file. The output of a program is written to stdout that I always write to a text file. I found myself copying a data file to the remote machine, executing the command on that file and copying the resulting file back. This is time consuming and error-prone.
Is it possible with SSH and the standard Linux tools to run a remote binary via SSH on a local file without copying it first to the remote machine?
Ideally, I would like to have a bash script on my local machine. I specify the data file as an argument and it performs all the SSH connection, data sending etc and outputs the result on stdout locally.
My local machine is Mac OS X and the remote is Linux. No, I can't get Linux binary to work on Mac OS X.
Update: The tool on the remote machine can read from stdin.
2Does the tool need this text file to be seekable? Can the tool accept stdin instead of a text file? If not, does it use stdin besides a text file? – Kamil Maciorowski – 2018-02-05T17:50:40.687
@KamilMaciorowski Yes, the tool can read from stdin. I updated the question. Thanks for the clarifying questions. – Vladislavs Dovgalecs – 2018-02-05T20:34:42.457