Enhance sftp protocol: get SHA hash of file

Dan Kaminsky dan at doxpara.com
Wed Jun 29 21:05:57 EST 2011


I could see various uses of this, and its not like OpenSSH doesn't already
have sha1 built in.  It could also be hacked in via a command line channel,
seeking sha1sum or a perl oneliner.

On Wed, Jun 29, 2011 at 3:57 AM, Thomas Güttler
<guettli at thomas-guettler.de>wrote:

> 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
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
>


More information about the openssh-unix-dev mailing list