Original: https://serverfault.com/a/208715
Instead of using tar to write to your local disk, you can write directly to the remote server over the network using ssh.
server1$ tar -zc ./path | ssh server2 "cat > ~/file.tar.gz"
Any string that follows your "ssh" command will be run on the remote server instead of the interactive logon. You can pipe input/output to and from those remote commands through SSH as if they were local. Putting the command in quotes avoids any confusion, especially when using redirection.
Or, you can extract the tar file on the other server directly: