Patch multihop scp with different ports
Hans Harder
hans at atbas.org
Wed Apr 17 20:23:52 WST 2013
I had some problems with the multihop for scp using different portnumbers.
The original syntax uses / as separator, which conflicts with the
current code in scp for detecting source and destination
Ex. scp file user at host1/2222,user at host2/22:.
Simplest way of solvng this was to allow also another char as
separator for a port, like '#'
So you can do: scp file user at host1#2222,user at host2#22:.
Just a one liner, which allows now to use both chars as a separator
--- cli-runopts.c 2013-04-15 08:01:57.000000000 -0600
+++ cli-runopts.c 2013-04-17 06:14:56.000000000 -0600
@@ -611,6 +611,7 @@ static void parse_hostname(const char* o
}
port = strchr(cli_opts.remotehost, '/');
+ if (!port) port = strchr(cli_opts.remotehost, '#');
if (port) {
*port = '\0';
cli_opts.remoteport = port+1;
More information about the Dropbear
mailing list