Enhance sftp protocol: get SHA hash of file

Thomas Güttler guettli at thomas-guettler.de
Wed Jun 29 20:57:15 EST 2011


Hi,

it would be great, if the sftp protocol could be
enhanced: get sha (or other hash value) from a file or part of a file.

This would make it possible to run a rsync like file transfer
on sftp.

I would suggest a protocol like this

Client sends to Server:

get-supported hash-methods

returns whitespace seperated list like md5 sha1 sha256 ....

get-hash HASH-METHOD FILENAME STARTOFFSET BYTECOUNT

returns: hexlified hash value (all lowercase)

To get the hash value of the whole file: STARTOFFSET=0 and BYTECOUNT=0

Anyone interested?

  Thomas Güttler


More information about the openssh-unix-dev mailing list