I need to transfer a file between two computers that are not connected to the same network. I got a third computer that can see both networks through a VPN.
From the third computer, I can do:
scp root@firstcomputer:./file ./
And finish the transfer with the following sentence:
scp ./file root@secondcomputer:./
But I cannot do it in just one line, as follows:
scp root@firstcomputer:./file root@secondcomputer:./
The error response is
ssh: connect to host secondcomputer port 22: No route to host
lost connection
I realize that is probably because firstcomputer cannot see secondcomputer. Is it possible to give SCP a param that deals with the fact that the machine that runs the SCP program is the only one who can see both computers?
By the way, the third computer is a Mac with Lion and the fist and second are running Debian.