Compare commits

...

1 Commits

Author SHA1 Message Date
Alexander Payne
1307121a61 fix(scripts/fleet_llama): use VerifiedSSHExecutor, remove StrictHostKeyChecking=no and bash -c
Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 26s
Smoke Test / smoke (pull_request) Failing after 23s
Validate Config / YAML Lint (pull_request) Failing after 15s
Validate Config / JSON Validate (pull_request) Successful in 17s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 55s
Validate Config / Python Test Suite (pull_request) Has been skipped
Validate Config / Shell Script Lint (pull_request) Failing after 1m11s
Validate Config / Cron Syntax Check (pull_request) Successful in 12s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 11s
Validate Config / Playbook Schema Validation (pull_request) Successful in 23s
PR Checklist / pr-checklist (pull_request) Successful in 4m27s
Architecture Lint / Lint Repository (pull_request) Failing after 25s
- Replace direct subprocess.run SSH invocation with VerifiedSSHExecutor
- Remove StrictHostKeyChecking=no (now uses verified host key checking via known_hosts)
- Remove bash -c local execution path for Mac (now uses verified executor with local=True)
- Align fleet_llama with PR #474's SSH trust architecture

Closes #434
2026-04-26 14:09:59 -04:00

View File

@@ -35,21 +35,10 @@ class FleetManager:
def run_remote(self, host: str, command: str):
ip = FLEET[host]["ip"]
ssh_cmd = [
"ssh", "-o", "StrictHostKeyChecking=no", "-o", "ConnectTimeout=5",
f"root@{ip}", command
]
# For Mac, we might need a different user or local execution
if host == "mac":
ssh_cmd = ["bash", "-c", command]
try:
result = subprocess.run(ssh_cmd, capture_output=True, text=True, timeout=10)
return result
except subprocess.TimeoutExpired:
return None
return self.executor.run_script(ip, command, local=(host == "mac"), timeout=10)
except Exception as e:
print(f"Error running remote command on {host}: {e}")
self.log(f" [ERROR] Failed to run remote command on {host}: {e}")
return None
def get_status(self, host: str):