lib: remote_access: reject unknown options for scp

We extended the rsync API, but these options don't work with scp,
so reject them quickly with a clear error message.

TEST=CQ passes

Change-Id: I7bb064f2074625e92620dacafed091a3f81e7f27
Reviewed-by: Matt Stark <>
Tested-by: Mike Frysinger <>
Commit-Queue: Mike Frysinger <>
diff --git a/lib/ b/lib/
index c80bb47..2e39fd4 100644
--- a/lib/
+++ b/lib/
@@ -790,6 +790,10 @@
             # TODO: Implement scp with remote sudo.
             raise NotImplementedError("Cannot run scp with sudo!")
+        for key in ("chmod", "chown", "relative", "mkpath"):
+            if kwargs.pop(key, None) is not None:
+                raise NotImplementedError(f"Cannot run scp with '{key}'")
         compress = kwargs.pop("compress", False)
         kwargs.setdefault("debug_level", self.debug_level)