0 votes
by (8.4k points)

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

1 Answer

0 votes
by (58.9k 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