Fix SSH known_hosts noise — add UserKnownHostsFile=/dev/null to all SSH calls

/root/.ssh is mounted read-only in the management container, causing stderr
noise on every SSH connection. Routing to /dev/null avoids the write attempt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-14 09:38:56 +00:00
parent caf81d5f39
commit cc5fc99242

View file

@ -111,6 +111,7 @@ async function sshGet(host, cmdArgs) {
const { stdout } = await spawnAsync('ssh', [
'-i', SSH_KEY,
'-o', 'StrictHostKeyChecking=no',
'-o', 'UserKnownHostsFile=/dev/null',
'-o', 'ConnectTimeout=2',
`root@${host}`,
...cmdArgs,
@ -126,6 +127,7 @@ async function sshExec(host, command) {
const child = spawn('ssh', [
'-i', SSH_KEY,
'-o', 'StrictHostKeyChecking=no',
'-o', 'UserKnownHostsFile=/dev/null',
'-o', 'ConnectTimeout=5',
`root@${host}`,
'sh', '-c', command,
@ -202,6 +204,7 @@ async function deploy(target, repoName) {
const { stdout } = await spawnAsync('ssh', [
'-i', SSH_KEY,
'-o', 'StrictHostKeyChecking=no',
'-o', 'UserKnownHostsFile=/dev/null',
`root@${target.host}`,
'sh', '-c', remoteCmd,
], { timeout: 300_000 })