I want to redirect the output of a local command (using local files) to a remote command.
I know doing something like this is possible:
[user@local ~]$ head -c 5 /dev/urandom | ssh email@example.com "cat"
... but I would like to know if there is a way to do this via the SSH console, just like the
scp command that refers both local and remote files:
[user@remote ~]$ scp test.txt remote:/new.txt
Copying the local file to the remote server is undesirable, I would just like to redirect output.
** Both machines run Linux (bash).