1

I'm using Renci SSH.NET library for secure ftp connection. Now I have to check free disk space available on remote SFTP server. How can I do this?

2
  • 1
    @leemo SFTP is not FTP and has nothing in common with it. SFTP version 6 lets one check available space on the volume. Commented Nov 4, 2013 at 18:08
  • 1
    OpenSSH SFTP server supports the [email protected] extension that returns that information.
    – salva
    Commented Nov 5, 2013 at 14:16

1 Answer 1

1

As Eugene commented, SFTP protocol actually have an API to check available space (SSH_FXP_EXTENDED request name space-available defined in draft-ietf-secsh-filexfer-extensions-00).

But Renci SSH.NET library does not support the extension. Also worth noting that most SSH/SFTP servers (notably OpenSSH, as the one the most widespread) do not support this extension either. So client-side support won't help much here.

As Salva has commented, OpenSSH on the other hand supports [email protected] proprietary extension with very similar functionality as space-available. And Renci SSH.NET library supports that too (via SftpClient.GetStatus). So if you are sure that you work against OpenSSH server, you can use that.

Not the answer you're looking for? Browse other questions tagged or ask your own question.