0 votes
by (320 points)

Hello, i'm trying to access files that are being stored on the server, and among files, i receive "." and ".." elements. Is there any way to not deliver them to client? debug view

I'm using SSH.NET Renci client.

Applies to: Rebex SFTP
by (132k points)
Hello, are you using the `Ftp` class from Rebex FTP/SSL or `Sftp` class from Rebex SFTP?
by (320 points)
Hello,
I'm using Rebex.FileServer (SFTP/SSH server component for .NET) nuget.
And class is FileServer is from Rebex.Net.Servers.
Hope that clarified something.
by (132k points)
Thanks for the clarification. I missed the last sentence about Renci at the client-side.

1 Answer

0 votes
by (132k points)
selected by
 
Best answer

Hello,

Our SFTP server provides "." and ".." elements primarily because most third-party servers including OpenSSH (the most common SFTP/SSH server) provide them as well.

Due to this being a common behavior, any SFTP client app that does not wish to process these elements should simply skip them (which is what our SFTP client actually does). I guess doing the same with Renci would be quite straightforward as well. As a bonus, this client-side solution would work with third-party SFTP servers as well.

If this is not practical for some reason (for example if the client application cannot be easily modified), we would consider adding an option to Rebex File Server that would disable providing "." and ".." elements to SFTP clients. In this case, please contact us at support@rebex.net if you are interested in this solution.

...