From f5b2e5eb9f72861a8a2b023f256540c01ca7502f Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Fri, 6 Feb 2026 20:05:06 +0100 Subject: [PATCH] run-vm.sh: fix SSH auth error due to agent keys Even when an identity file (i.e. a private key) is specified, SSH tries all keys loaded by the SSH agent first for authentication (if an agent is running). When the agent returns many keys this can lead to a "Too Many Failures" auth error, because none of the agent keys are accepted by the VM SSH server. Fix this by only using the provided key. --- examples/qemu-vm/run-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qemu-vm/run-vm.sh b/examples/qemu-vm/run-vm.sh index 51b7133..f54d320 100644 --- a/examples/qemu-vm/run-vm.sh +++ b/examples/qemu-vm/run-vm.sh @@ -41,7 +41,7 @@ vmWaitForSSH() { # Run command in VM c() { - ssh -p "$sshPort" -i "$identityFile" -o ConnectTimeout=1 \ + ssh -p "$sshPort" -i "$identityFile" -o IdentitiesOnly=yes -o ConnectTimeout=1 \ -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR \ -o ControlMaster=auto -o ControlPath=$tmpDir/ssh-connection -o ControlPersist=60 \ root@127.0.0.1 "$@"