diff --git a/services/node-agent/src/node_agent.py b/services/node-agent/src/node_agent.py index 75cb2e5..dbb9b61 100644 --- a/services/node-agent/src/node_agent.py +++ b/services/node-agent/src/node_agent.py @@ -472,7 +472,16 @@ class NodeAgent: f"{VPS_EVENTS_PATH}/{self.node_name}/") cmd = [ "rsync", "-az", "--remove-source-files", - "-e", "ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o BatchMode=yes", + # -F /dev/null: skip ~/.ssh/config entirely. The .ssh dir is + # mounted from the host oskar user into the container which runs + # as root; OpenSSH rejects config files owned by a different UID. + # UserKnownHostsFile=/dev/null pairs with StrictHostKeyChecking=no + # so we never try to write a known_hosts inside a read-only mount. + "-e", ("ssh -F /dev/null" + " -o StrictHostKeyChecking=no" + " -o UserKnownHostsFile=/dev/null" + " -o ConnectTimeout=10" + " -o BatchMode=yes"), local_dir, remote_dir, ]