From patchwork Thu Oct 27 18:36:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 619207 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp506461pvb; Thu, 27 Oct 2022 12:11:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ykL4hyKmREMEbALYSqylIbmHK2HMu6qcd2T+orbLZUzoe99MhBpd850SDiYCE5xWGvIoi X-Received: by 2002:ad4:5ba3:0:b0:4bb:62e5:1db6 with SMTP id 3-20020ad45ba3000000b004bb62e51db6mr23139855qvq.89.1666897879640; Thu, 27 Oct 2022 12:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666897879; cv=none; d=google.com; s=arc-20160816; b=SNoidxY2t3DJ3IKiJWTe+OxT6yXGGH/xrRop4PhwpbwYpsrUdP3qEhzYIcOSzqXnTg /nRBa0rb7phMBJ+1fjXs/QOwr6DRpqBX9Y27eDSnjJZjK9OFzVTX43bKcNJAerAO8x5v KyL3H0oKcfN0G043aufs9TAyoJtDBPYYcdtlmTaeOSJq9PxJDxsdly/1EXGMQvPKWWIq YFxeMn0O40LUQDqZucpr9WwoHl+4Kusbcfh7Qm/N3hkDXcQTAVjmsOUtJPWqD8iQMXko +ArpooBvFDD/0M9AvQCXOFNdlvIviHCwnYLKVCRrNxx2O3ydUSfCvKuaRuTDETNlJhOw cE9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=A0SXCM+KSqiVxWBvTd3VpYjIcK+dRrJ055VbgsI9csQ=; b=KsT/w/PznjW+lfu4ZhY52yfd0W3tCjcMn46Ecuodr4ISJpRi/KO86Yd21ELTKZt8B9 VxxR7J9i3NZ27MbE5w36vuIG/akzOl5+TsmZNGpgm8V0rfGzPm1kwbtJZ0KOVzbBUyzH nrQkXR0RMcCeD7YsSPlZfEaRwDDFIWqNNoRwk9xtV3SITvsT+Xq6qVv8QxzZ5tQp0y9d YWvc5MC+7ZN1Cnw0nbqYCFmhDcw0mTQypFHiDZrA7QR4JQb0+tfwyt4IzIPTos6y0apd xkvm31mxtnbSjZHwsCw4g1JnvNEPxNv/JhNsTw1mhxGEywpsHzAKQOsIA5WpYUeoJ8vH NDJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iiY712eK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v14-20020a05622a188e00b00398533be759si1606736qtc.204.2022.10.27.12.11.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Oct 2022 12:11:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iiY712eK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oo82h-0001TF-2t; Thu, 27 Oct 2022 14:55:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo829-0008WE-VK for qemu-devel@nongnu.org; Thu, 27 Oct 2022 14:55:19 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oo81n-0006A7-Gl for qemu-devel@nongnu.org; Thu, 27 Oct 2022 14:55:17 -0400 Received: by mail-wr1-x433.google.com with SMTP id bs21so3753509wrb.4 for ; Thu, 27 Oct 2022 11:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A0SXCM+KSqiVxWBvTd3VpYjIcK+dRrJ055VbgsI9csQ=; b=iiY712eK6CAp/VUCSHW2N8lxgtMOfRVKPbT0gYFgxNFHerCMtSxI5VueLLe1rKicLq dHfTjENXN2cFJLTXWuZbCTLhZ6V9PvSYD5GtYBgK50zNgnwwR0YV7ncR/jn7sR4fc7Ac LkrlXEXsZFyP8dcODFAMODxma/FkcAUqG5uv7DEQQI6XvdK4biIO52LgSYEJeEMffkCd lOKUfP1rodoyxuMohKXDg8I8vYowuAegIu9hK7FY0idW5BlNmZs7/hq4oRNUpzeyQpEA ALFxYJGzN6va2V1eiCiYUwNAnukgWIXOF859xmd1qhEzZdsjqb4V3pYAuZvbRyuyo79n raNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A0SXCM+KSqiVxWBvTd3VpYjIcK+dRrJ055VbgsI9csQ=; b=B/wS46UKypH5EJdoe+E8uRzjCkKc/6rw88SOykNJS/5tQOajjJxqAvyWwgBopZwJAz PGqpkFfPGErtBf1ictUbGO+W5xI6qlYO6QvdMKg6SVHGlMfNA0lEef+JTMWIYbddQKR1 e1+g9uj7RlOE7kzz5Cq4u7NTvkQPSPYxbNkpsNvuOYd1bDfqfbR9VVwpq5g0UskUA5Hl D9UsNOHUtIjygby5gmMzTqGlFVXq1m/nqlqjR98fz2xWXe5b8epC+XdeQmoBOEJ8SKEw kDNdRqZzREbKekW41LMiCqcQ2qlikgmkj/Jz64MWA+tHnT9f5POHnx71ZXUE4VzPB34V U1mA== X-Gm-Message-State: ACrzQf2J4FuMVGFQZnfODXNUEy9n/QedHhMcNWBlAUG7AlFbovl+PoIV vSoCc0IzFzbjkx0qO2xmH8fMew== X-Received: by 2002:adf:e84f:0:b0:235:d53a:2d7f with SMTP id d15-20020adfe84f000000b00235d53a2d7fmr27219508wrn.334.1666896892149; Thu, 27 Oct 2022 11:54:52 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id j8-20020a5d6188000000b0022e035a4e93sm1886126wru.87.2022.10.27.11.54.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 11:54:51 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 26A0B1FFD3; Thu, 27 Oct 2022 19:36:40 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, Ilya Leoshkevich , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v4 30/30] tests/vm: use -o IdentitiesOnly=yes for ssh Date: Thu, 27 Oct 2022 19:36:36 +0100 Message-Id: <20221027183637.2772968-31-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221027183637.2772968-1-alex.bennee@linaro.org> References: <20221027183637.2772968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich When one has a lot of keys in ~/.ssh directory, the ssh command will try all of them before the one specified on the command line, and this may cause the remote ssh server to reject the connection due to too many failed authentication attempts. Fix by adding -o IdentitiesOnly=yes, which makes the ssh client consider only the keys specified on the command line. Signed-off-by: Ilya Leoshkevich Reviewed-by: Thomas Huth Message-Id: <20221027113026.2280863-1-iii@linux.ibm.com> Signed-off-by: Alex Bennée --- tests/vm/basevm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 4fd9af10b7..2276364c42 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -233,7 +233,8 @@ def _ssh_do(self, user, cmd, check): "-o", "UserKnownHostsFile=" + os.devnull, "-o", "ConnectTimeout={}".format(self._config["ssh_timeout"]), - "-p", str(self.ssh_port), "-i", self._ssh_tmp_key_file] + "-p", str(self.ssh_port), "-i", self._ssh_tmp_key_file, + "-o", "IdentitiesOnly=yes"] # If not in debug mode, set ssh to quiet mode to # avoid printing the results of commands. if not self.debug: