12
3
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.
My scp does not implement -3 when I execute the comand i get scp: illegal option -- 3 usage: scp [-1246BCEpqrv] ... – JorgeO – 2011-07-26T16:50:40.270
1That's correct. -3 is only available in the latest version of OpenSSH, which I am not sure that Debian has implemented yet. – Rilindo – 2011-07-26T16:51:57.340
Ahh, sorry about that. Updated the answer regarding version requirement. – andol – 2011-07-26T16:58:09.380