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.
This commit is contained in:
@@ -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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user