net-ssh/net-scp

SCP servers that do not support quoting

drieseng opened this issue · 1 comments

I maintain a .NET SCP library, and I was wondering how you guys deal with SCP servers that do not support quoting paths.

I have users that want to use our library to download or upload files to MikroTik routers, but these routers do not require quoting paths (more below). However, it's not limited to to the MikroTik routers as I was just able to reproduce the problem with the SolarWinds SFTP/SCP Server.

If you'd enclose the path with single or double quotes (I'm over-simplying it here) with these SCP servers, then you end up with files that effectively have file names that are enclosed with these quotes. This also applies to escaping characters using backslashes (eg. escaping a # with a backslash gives you a file that contains the " characters).

I don't immediately see how a quoting mechanism can be applied that works for both shell and non-shell based SCP servers.

I was going to open a new issue but saw this one. I think we had a similar problem. Take a look at #34. Maybe that change will help you.