Transferring files between servers on a private network?

Steve Dondley sdondley at gmail.com
Thu Dec 10 04:48:35 AEDT 2020


This command transfers a file from Machine B to Machine A:

scp -3 -o StrictHostKeyChecking=no -i ~/.ssh/secret.pem -o \
ProxyCommand="ssh -o StrictHostKeyChecking=no \
-i ~/.ssh/secret.pem -W %h:%p admin at 7.7.7.7" \
admin at 192.168.1.20:/home/admin/file.pdf admin at 192.168.1.10:/home/admin

Machine A has the public IP of 7.7.7.7 and a private IP of 192.168.10.

Machine B has the private IP of 192.168.1.20.

The goal of the command is to log into Machine A on the public network at
7.7.7.7 and then transfer files from from B to A strictly across the
private network.

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? Is there an easy way to
trace the path of the file between machines?


More information about the openssh-unix-dev mailing list