Hello, 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
Miguel de Val Borro wrote:> 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?I don't think so. Suggest you use a host alias that you can configure in .ssh/config on the remote host. Use hostname, hostkeyalias and port. //Peter
On 05/31/2010 05:35 PM, Miguel de Val Borro wrote:> Hello, > > 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 mindrot.org > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev >The syntax -P #[,#] would be nice for this.
--On 31 May 2010 22:10:07 -0400 Matthew Monaco <dgbaley27 at verizon.net> wrote:>> 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 mindrot.org >> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev >> > > The syntax -P #[,#] would be nice for this.Actually the syntax scp:source.example.com:1234:source/file dest.example.com:3456:dest/file 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