diff --git a/cmd/serve/sftp/sftp.go b/cmd/serve/sftp/sftp.go index ef7a8f983..b1be36bb1 100644 --- a/cmd/serve/sftp/sftp.go +++ b/cmd/serve/sftp/sftp.go @@ -100,6 +100,17 @@ be used with sshd via ~/.ssh/authorized_keys, for example: restrict,command="rclone serve sftp --stdio ./photos" ssh-rsa ... +On the client you need to set "--transfers 1" when using --stdio. +Otherwise multiple instances of the rclone server are started by OpenSSH +which can lead to "corrupted on transfer" errors. This is the case because +the client chooses indiscriminately which server to send commands to while +the servers all have different views of the state of the filing system. + +The "restrict" in authorized_keys prevents SHA1SUMs and MD5SUMs from beeing +used. Omitting "restrict" and using --sftp-path-override to enable +checksumming is possible but less secure and you could use the SFTP server +provided by OpenSSH in this case. + ` + vfs.Help + proxy.Help, Run: func(command *cobra.Command, args []string) { var f fs.Fs