5

How to copy between two remote hosts using tar piped into scp from remote server when behind a firewall?

view full story
linux-howto

http://unix.stackexchange.com – I'd like to transfer a directory between two servers, but compress the directory on the remote host before transfer, and then uncompress to another host. I'm sure it's possible to pipe everything all the way through and do it in a one liner. I realise it would be better of course if I could transfer between the hosts directly but that would involve transferring keys and what not, and I love Unix one line power tools. I'm sure people can come up with a few different ways to do this. I'm looking for the shortest syntax and most bandwidth conservative. To start off I have ssh -n REMOTEHOST 't (HowTos)