From 4c93378f0e67fd65167abbd25e0b20d668102f1f Mon Sep 17 00:00:00 2001 From: thomae <4493560+thomae@users.noreply.github.com> Date: Thu, 11 Nov 2021 13:35:02 +0100 Subject: [PATCH] serve sftp: update docs on --stdio --- cmd/serve/sftp/sftp.go | 11 +++++++++++ 1 file changed, 11 insertions(+) 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