matt.p...@gmail.com writes:
> Apologies if this is handled somewhere, "--" is unbelievably hard to google for in context.
>
> I'm having a problem with an embedded system which doesn't like the '--' that the scp client in openssh sends to end argument processing.
>
> debug1: Sending command: scp -v -f -- /foo.txt
> Received disconnect from
10.1.1.1: 2: Protocol error.
This was fixed in OpenSSH 6.0, which now adds the "--" only if needed
because of a leading "-" in the next token on the command line:
[scp.c]
- xasprintf(&bp, "%s -f -- %s", cmd, src);
+ xasprintf(&bp, "%s -f %s%s", cmd,
+ *src == '-' ? "-- " : "", src);
So, you could avoid this by upgrading the client.
- Richard