From 0008cb4934242757606b4c1305971fc51e7adef4 Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Mon, 29 Aug 2022 14:32:00 +0200 Subject: [PATCH] docs: document that serve sftp uses chunk size 32 KiB See #6404 --- cmd/serve/sftp/sftp.go | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/cmd/serve/sftp/sftp.go b/cmd/serve/sftp/sftp.go index 1a7b7717c..46c485d75 100644 --- a/cmd/serve/sftp/sftp.go +++ b/cmd/serve/sftp/sftp.go @@ -48,7 +48,7 @@ func AddFlags(flagSet *pflag.FlagSet, Opt *Options) { flags.StringVarP(flagSet, &Opt.User, "user", "", Opt.User, "User name for authentication") flags.StringVarP(flagSet, &Opt.Pass, "pass", "", Opt.Pass, "Password for authentication") flags.BoolVarP(flagSet, &Opt.NoAuth, "no-auth", "", Opt.NoAuth, "Allow connections with no authentication if set") - flags.BoolVarP(flagSet, &Opt.Stdio, "stdio", "", Opt.Stdio, "Run an sftp server on run stdin/stdout") + flags.BoolVarP(flagSet, &Opt.Stdio, "stdio", "", Opt.Stdio, "Run an sftp server on stdin/stdout") } func init() { @@ -61,11 +61,19 @@ func init() { var Command = &cobra.Command{ Use: "sftp remote:path", Short: `Serve the remote over SFTP.`, - Long: `Run a SFTP server to serve a remote over SFTP. This can be used -with an SFTP client or you can make a remote of type sftp to use with it. + Long: `Run an SFTP server to serve a remote over SFTP. This can be used +with an SFTP client or you can make a remote of type [sftp](/sftp) to use with it. -You can use the filter flags (e.g. ` + "`--include`, `--exclude`" + `) to control what -is served. +You can use the [filter](/filtering) flags (e.g. ` + "`--include`, `--exclude`" + `) +to control what is served. + +The server will respond to a small number of shell commands, mainly +md5sum, sha1sum and df, which enable it to provide support for checksums +and the about feature when accessed from an sftp remote. + +Note that this server uses fixed 32 KiB packet size, which means you must not +configure the client to use any other values, e.g. with the +[chunk_size](/sftp/#sftp-chunk-size) option on an sftp remote. The server will log errors. Use ` + "`-v`" + ` to see access logs. @@ -78,11 +86,6 @@ You must provide some means of authentication, either with ` + "`--auth-proxy`" + `, or set the ` + "`--no-auth`" + ` flag for no authentication when logging in. -Note that this also implements a small number of shell commands so -that it can provide md5sum/sha1sum/df information for the rclone sftp -backend. This means that is can support SHA1SUMs, MD5SUMs and the -about command when paired with the rclone sftp backend. - If you don't supply a host ` + "`--key`" + ` then rclone will generate rsa, ecdsa and ed25519 variants, and cache them for later use in rclone's cache directory (see ` + "`rclone help flags cache-dir`" + `) in the "serve-sftp"