May 2017
Beginner
552 pages
28h 47m
English
SSH allows you to use output from a task on your local system as input on the remote system:
$ echo 'text' | ssh user@remote_host 'echo' text
Alternatively, this can be used:
# Redirect data from file as: $ ssh user@remote_host 'echo' < file
echo on the remote host prints the data received through stdin, which in turn is passed to stdin from localhost.
This facility can be used to transfer tar archives from a local host to the remote host. This is described in detail in Chapter 7, The Backup plan:
$> tar -czf - LOCALFOLDER | ssh 'tar -xzvf-'