Alex Rivera | Logout

How does scp traffic flow between two remote hosts?

Asked 2010-08-04T16:03:40.143
17

If you issue a scp command between 2 remote servers, will the traffic flow directly between the hosts, or will it flow from Remote1 => Local Machine => Remote2?

For example I issue this command on my laptop:

scp user1@remote1.com:/Files user2@remote2.com:/Files
Edit
Report

3 Answers

25

Newer versions of scp (since 2011) have the option -3 which will route the traffic through your local machine. This is useful if the hosts are on different networks and can't see each other. Found this on SuperUser. From your linked article it seems like normally the hosts will try to connect directly to each other.

answered 2012-04-24T09:57:27.283
2

Looks like it can be done.

answered 2010-08-04T16:42:29.770
0

If your linux/bsd/unix or Mac do not have the -3 option, just compile the last version from: http://www.openssh.org/portable.html

It is as simple as:

./configure; make ; sudo make install

It will be installed on /usr/local/bin by default. I just did that on my Mac OS X Lion.

answered 2013-05-30T00:23:46.990

Your Answer