SFTP hash mismatch error when using rclone RC API (/sync/copy) – works via CLI but fails via curl

What is the problem you are having with rclone?

I'm trying to run a large SFTP upload (~4 TB) via the rclone rc API (specifically sync/copy), but I run into hash mismatch errors only when using the rc API. The exact same operation works perfectly via the CLI using --sftp-disable-hashcheck.

Via the API, rclone transfers the file, but then tries to run a hash check on the SFTP destination, fails (due to missing hash), and deletes the file, even though the upload was successful.

Run the command 'rclone version' and share the full output of the command.

rclone v1.66.0
- os/version: alpine 3.19.1 (64 bit)
- os/kernel: 5.10.149+ (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22.1
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

SFTP remote (to a NAS on another network)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

This works perfectly via CLI inside the container:

rclone copy /data/01_2025 nas2_remote:remote_backups/01_2025 --sftp-disable-hashcheck

But the same logic via rc API fails:

curl -u <RC_USER>:<RC_PASSWORD> -X POST http://localhost:5572/sync/copy   -H "Content-Type: application/json"   -d '{
    "srcFs": "/data/01_2025",
    "dstFs": "nas2_remote:remote_backups/01_2025",
    "noCheckDst": true,
    "ignoreChecksum": true,
    "errorOnHashMismatch": false
  }'

Please run 'rclone config redacted' and share the full output.

[nas2_remote]
type = sftp
host = 192.168.178.250
user = <SFTP_USER>
port = 2222
key_file = /root/.ssh/id_rsa

A log from the command that you were trying to run with the -vv flag

{
    "error": "corrupted on transfer: md5 hashes differ src(Local file system at /data/01_2025) \"abcd1234...\" vs dst(sftp://<SFTP_USER>@192.168.178.250:2222/remote_backups/01_2025) \"\"",
    "input": {
        "srcFs": "/data/01_2025",
        "dstFs": "nas2_remote:remote_backups/01_2025",
        "noCheckDst": true,
        "ignoreChecksum": true,
        "errorOnHashMismatch": false
    },
    "path": "sync/copy",
    "status": 500
}

Additional info

The SFTP target is a NAS that does not support md5sum (and can't be changed easily).
The file is correctly uploaded (I verified manually), but rclone deletes it after the transfer due to the failed hash check.

Is there a way to reliably skip or disable hash checking via the rc API, just like --sftp-disable-hashcheck works in the CLI?

Thanks so much for your help!

– kuhni

welcome to the forum,

that is an old version. can rclone selfupdate and test again.


some possible solutions:

  1. add disable_hashcheck = true to the config file or api call
  2. add shell_type = none to the config file or api call
  3. add md5sum_command = none to the config file or api call