Many times I have to remotely transfer files between 2 Hosts. And sometimes those hosts are not able to communicate to each other. In order to copy a file from host1 to host2 I had to copy it to my workstation first. But this is not necessary...
It is possible to execute scp like this:
In this example host1 and host2 are able to communicate together(user exist and perhaps ssh-keys too). I execute scp on host3 but the files are copied between host1 and host2. But what if host1 and host2 are not able to contact each other? For those cases I found a wonderful scp-switch in the manual:
-3 Copies between two remote hosts are transferred through the local host. Without
this option the data is copied directly between the two remote hosts. Note that
this option disables the progress meter.