- # pushing data to an ssh server:
tar czf - files/directories | ssh user@host "cd /fullpath && tar xzvf -"
- # pushing data to a tar.gz file on a remote ssh server:
tar czf - files/directories | ssh user@host "cat > /fullpath/file.tgz"
- # pulling data from an ssh server:
ssh user@host "tar czf - files/directories" | tar xzvf -