Transferring files between servers on a private network?

Brian Candler b.candler at pobox.com
Thu Dec 10 05:14:29 AEDT 2020


On 09/12/2020 17:48, Steve Dondley wrote:
> Though the command works and transfers files between machines, I'm not sure
> if it does it strictly over the private network. How can I be sure the file
> isn't going from B to A over the private network and then down to my local
> machine over the public network and then back up to A over the public
> network and then back to A on the private network?

It *is* going up to your local client and back again: -3 (third party 
copy) does exactly that. It makes separate ssh connections to the two 
hosts (which is why the ProxyCommand is required in your case), slurps 
the file from the left-hand host and uploads it to the right-hand host.

If you don't want to do that, then omit the -3.  Then it will login to 
left-host, and instruct it to copy the given file to right-host.  
However you may need to use agent forwarding so that left-host can 
authenticate to right-host.



More information about the openssh-unix-dev mailing list