openssh and multiple ports

Kevin Steves stevesk at pobox.com
Fri Sep 7 05:44:11 EST 2001


On Thu, 6 Sep 2001, Adam McKenna wrote:
:Sorry to add more fuel to this fire, but since we're having the discussion
:anyway, it bears mentioning that SCP claims to support copying files
:between *two* remote machines.  (i.e., using a third machine as an
:intermediate).  This breaks if ssh is running on a different port on either
:machine.  There should be a way to set the port for both source and
:destination.

i wonder how many people use third-party copies?

third-party copies work by changing:
scp user1 at host1:dir/foo user2 at host2:dir/bar
to:
ssh -l user1 host1 scp dir/foo user2 at host2:dir/bar

if we add some special port notation to the path, what happens when host2
scp does not recognize it?  the way to do this is to handle -o properly
(it's not handled at all now for third-party copies).

scp -oport=2222 user1 at host1:dir/foo -oport=3333 user2 at host2:dir/bar
then we get:
ssh -l user1 -oport=2222 host1 scp -oport=3333 dir/foo user2 at host2:dir/bar

it may not be that hard to fix this with optreset, but i'm not sure it's
worth it.




More information about the openssh-unix-dev mailing list