Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
August 29, 2012, 7:55 pm
rate this thread
for in context.
I'm having a problem with an embedded system which doesn't like the '--' th=
at 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.
I'm working with the vendor to see if we can get the server fixed, but in t=
he mean time I'm looking for a workaround. Does anyone know of a way to co=
nvince the openssh to not send the --? I know it can work since older vers=
ions didn't send it... we ran into this problem while migrating some script=
ery to a newer box.
Thanks for any suggestions!
- Richard E. Silverman
August 29, 2012, 10:59 pm
Re: Prevent openssh from sending "--" to the server with scp?
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:
- 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.
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum