scp port on remote hosts

Alex Bligh alex at
Tue Jun 1 21:40:28 EST 2010

--On 31 May 2010 22:10:07 -0400 Matthew Monaco <dgbaley27 at> 

>> I would like to specify ports on both hosts to copy files between two
>> remote computeres. Is there any way to do this with scp? The -P flag
>> seems to apply to the port on the second host only.
>> Regards,
>> Miguel
>> _______________________________________________
>> openssh-unix-dev mailing list
>> openssh-unix-dev at
> The syntax -P #[,#] would be nice for this.

Actually the syntax

would be even more useful. I can only suppose this is not implemented
as there is a theoretically possibility the file is called
"1234:source/file", though this could be specified by quoting, inserting
"./" or whatever.

Alex Bligh

More information about the openssh-unix-dev mailing list