SCP two remote hosts with non-default ports

gerryny at gmail.com gerryny at gmail.com
Sat May 12 07:03:24 EST 2007


Hi,

I'm having trouble finding the correct syntax to scp between two
remote hosts with non-defaults ports.

<scp -P 1234 user at remotehost:/sourcefile -P 4321 user at remotehost:/destfile>

No matter what i've tried i cant get scp to connect both servers with
different ports.  Is this even possible?

The workaround i've found is to use <ssh... "scp...">

Thanks,
gerryny at gmail dot com


More information about the openssh-unix-dev mailing list