diff --git a/backend/sftp/sftp.go b/backend/sftp/sftp.go index 5feb863d6..8c66fbb7e 100644 --- a/backend/sftp/sftp.go +++ b/backend/sftp/sftp.go @@ -780,7 +780,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e if err != nil { return nil, err } - if len(opt.SSH) != 0 && (opt.User != "" || opt.Host != "" || opt.Port != "") { + if len(opt.SSH) != 0 && ((opt.User != currentUser && opt.User != "") || opt.Host != "" || (opt.Port != "22" && opt.Port != "")) { fs.Logf(name, "--sftp-ssh is in use - ignoring user/host/port from config - set in the parameters to --sftp-ssh (remove them from the config to silence this warning)") }