-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCPEngine should not quote remote paths #184
Comments
Would it work if we escaped the spaces using a |
The escaping does not seem to work on Linux, either. |
I think that sshj should do what openssh does. On Fri, Mar 27, 2015 at 11:33 AM, Björn Karge notifications@github.com
|
I'm not sure, what scp "does". All I see is it "does not care" and subjects the interpretation of the file name to the escaping rules of the target shell (and probably other things). |
@fbacher I disagree. I think that SSHJ should be compatible with as many different SSH implementations as possible. This means that the scope is broader than OpenSSH. See for instance the issues against PSFTP, WinSSHD, etc... I indeed want to aim for a near 100% solution like @bkarge says. For this we need to find a correct quoting/escaping. That is not trivial, but the "just send it unquoted" option will definitely not work in a lot of cases. |
If the correct escaping and/or quoting is that difficult you should make to configurable. /home/user/test'ed Such a filename can not be used (e.g. download) with sshj at the moment, as the resulting command is: scp -f -q -p -r '/home/user/test'ed' |
Furthermore the implemented escaping for single quotes is defect: SCPEngine line 112: The used method replaceAll requires an regex (and a single quote is not a valid regex). |
SCPEngine.execSCPWith wraps the given path with single quotes and adds an escape character to any quotes in the path. This creates problems for some remote systems, such as vxWorks, which, at least on the version I'm communicating with, does not strip the quotes, resulting in invalid file name errors.
The text was updated successfully, but these errors were encountered: