From 74331ac3019c7a9033f7a886502f9e2a9895e4b3 Mon Sep 17 00:00:00 2001 From: Simone Date: Tue, 12 May 2026 22:29:57 +0200 Subject: [PATCH] fix(diagnostics): use StrictHostKeyChecking=no for Linux guest-diag SSH Diagnostics is best-effort. Using accept-new without UserKnownHostsFile caused the system known_hosts (~/.ssh/known_hosts) to be consulted, which holds a stale key from a previous clone of the same IP. Switch to no+NUL (same as Wait-VMReady) to avoid false host-key errors. --- scripts/_Common.psm1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/_Common.psm1 b/scripts/_Common.psm1 index 1bdde4c..d849225 100644 --- a/scripts/_Common.psm1 +++ b/scripts/_Common.psm1 @@ -391,7 +391,8 @@ function Get-GuestDiagnostics { Write-Warning "[Diagnostics] No SshKeyPath supplied for Linux guest — skipping." return } - $sshOpts = @('-i', $SshKeyPath, '-o', 'StrictHostKeyChecking=accept-new', + $sshOpts = @('-i', $SshKeyPath, '-o', 'StrictHostKeyChecking=no', + '-o', 'UserKnownHostsFile=NUL', '-o', 'ConnectTimeout=10', '-o', 'BatchMode=yes') try { # Collect: journalctl errors, ps, df