When using SFTP backend, does rclone run SSH commands on remote, or only SFTP protocol commands?

Hi,
I am surprised to discover that doing rsync -az /test/ root@192.168.0.2:/backup/test/ requires having rsync installed both on local computer and remote as well. I thought rsync only used standard SFTP commands (open, put, get files and seek in files), but in fact it launches the rsync executable on remote as well!

Question: when using SFTP backend, does rclone also run commands on remote (via SSH?). If so, which binaries are run on remote?

Or does it only use SFTP protocol, and runs no executable via SSH on remote?

I'm pretty sure it only uses plain SFTP protocol, without relying on any kind of executables on the remote. Rclone's sftp implementation is based on this third party package.

Thanks for your answer.

I see https://github.com/rclone/rclone/blob/master/backend/sftp/sftp.go#L168 it uses md5sum, I don't know how if it calls the md5sum binary on remote, or if it's something else?

You don't need any ssh commands for rclone to run via SFTP.

However if rclone has access to md5sum or sha1sum it can use those for calculating hashes which is good for data integrity checks. It will use df if available for rclone about (which is disk free in rclone mount)

You can also disable these with --sftp-disable-hashcheck.

If these files aren't available then rclone will carry on without those features.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.