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.
This commit is contained in:
@@ -391,7 +391,8 @@ function Get-GuestDiagnostics {
|
|||||||
Write-Warning "[Diagnostics] No SshKeyPath supplied for Linux guest — skipping."
|
Write-Warning "[Diagnostics] No SshKeyPath supplied for Linux guest — skipping."
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
$sshOpts = @('-i', $SshKeyPath, '-o', 'StrictHostKeyChecking=accept-new',
|
$sshOpts = @('-i', $SshKeyPath, '-o', 'StrictHostKeyChecking=no',
|
||||||
|
'-o', 'UserKnownHostsFile=NUL',
|
||||||
'-o', 'ConnectTimeout=10', '-o', 'BatchMode=yes')
|
'-o', 'ConnectTimeout=10', '-o', 'BatchMode=yes')
|
||||||
try {
|
try {
|
||||||
# Collect: journalctl errors, ps, df
|
# Collect: journalctl errors, ps, df
|
||||||
|
|||||||
Reference in New Issue
Block a user