Calculate MD5 remote file checksum with SFTP

0 votes
asked Jun 6, 2014 by Rebex KB (8,430 points)
edited Jun 6, 2014

Is there a way to calculate remote file checksum when connected to an SFTP server?

1 Answer

0 votes
answered Dec 20, 2016 by Tomas Knopp (58,890 points)
Best answer

Since version 2016 R3 Rebex SFTP supports the 'check-file' extension of SFTP protocol.

To get the remote file checksum, just use the GetChecksum method.

string remoteChecksumMd5 = sftp.GetChecksum(remotePath, ChecksumAlgorithm.MD5);
string remoteChecksumSha256 = sftp.GetChecksum(remotePath, ChecksumAlgorithm.SHA256);

See more code examples at