1
mirror of https://github.com/rclone/rclone synced 2024-12-26 18:23:45 +01:00

serve sftp: fix detection of whether server is authorized

This commit is contained in:
Nick Craig-Wood 2019-08-07 16:36:17 +01:00
parent d0c65b4c5e
commit 84b5da089e

View File

@ -130,8 +130,8 @@ func (s *server) serve() (err error) {
fs.Logf(nil, "Loaded %d authorized keys from %q", len(authorizedKeysMap), authKeysFile) fs.Logf(nil, "Loaded %d authorized keys from %q", len(authorizedKeysMap), authKeysFile)
} }
if !s.opt.NoAuth && len(authorizedKeysMap) == 0 && s.opt.User == "" && s.opt.Pass == "" { if !s.opt.NoAuth && len(authorizedKeysMap) == 0 && s.opt.User == "" && s.opt.Pass == "" && s.proxy == nil {
return errors.New("no authorization found, use --user/--pass or --authorized-keys or --no-auth") return errors.New("no authorization found, use --user/--pass or --authorized-keys or --no-auth or --auth-proxy")
} }
// An SSH server is represented by a ServerConfig, which holds // An SSH server is represented by a ServerConfig, which holds