From patchwork Mon Oct 31 13:10:10 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: 620239 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2820137pvb; Mon, 31 Oct 2022 06:22:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6AYXsr7JuVeIcqppgSCnA7Tfv8puCFmzHw2HxFtznCiOrAiss7ZcPO6LgY/fYAftE9Zkdn X-Received: by 2002:a05:6214:2688:b0:4bb:61a2:e7db with SMTP id gm8-20020a056214268800b004bb61a2e7dbmr10883908qvb.100.1667222558412; Mon, 31 Oct 2022 06:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667222558; cv=none; d=google.com; s=arc-20160816; b=WwEBfhTnR7F81bDUcXTSN80g3zL3mmyfp7/ZZfZFVJLdUnrBj7cEMSg+6/tzvk9apS D8XUB1YttCIPPxzRPj5Uhb6RMQKl/dOLcJoGMEPjDqDTYTXONg4PTlXeHlR3nDy73her Ax0OlqZnSQSSoeo04yzUdfKgXcqqte6bEwxsZ+XBwJO/3fHGCfV2FVrhqj4bRxMbcka5 E7sd/3DNOsOJmvH+/DdsLh383JnUxlscFspiOsmTqIUwEla4HXDnH12Gb3QHTlx3jlI9 NG1pRqlJcME1SdzNPCEL+j7S0lBMmIClmHZr9TT07iCqcWJ5L7gts72MHHWIpa+OMLVm blMA== 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=BP29Ki6yP/DZbhV0oFjwlgXIaAyAE9rA1CMCqvoccmU=; b=TLVN+Tu+SyfoOxakCUHxaRn/ccJP47hHhzeCiGrB57pCiLRNxbpQyTWqueDLEeAtaR I9WxD7Tn0x+LLaY/34ctAsHMVgVyP1NDFuce2QoWx7rCqUSPRVy0MQ4TnYYEi5XdfKNu tWEJguzoXtFqQCM1f4477blWqV+maSN9FFscfUklXhb1nH1FLPw5f5lJC49WjZoQrOxE bpt7wlyQDmTJw0Jucx5i469U1lVP4g39bgqSSzFNCF8QU06d0GkL541VT11S5mE2L6vt aNvttjGft2S4bxVl7LIvMbiblR4OAgk8LElAcn0rxnYribGsB4sGVEZvERerHoI+F6ww bexg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SUpnCi7P; spf=pass (google.com: domain of qemu-devel-bounces+peter.griffin=linaro.org+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+peter.griffin=linaro.org+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 dv3-20020ad44ee3000000b004bbfa7d5ca9si1367091qvb.205.2022.10.31.06.22.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 Oct 2022 06:22:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+peter.griffin=linaro.org+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=SUpnCi7P; spf=pass (google.com: domain of qemu-devel-bounces+peter.griffin=linaro.org+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+peter.griffin=linaro.org+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 1opUie-0005pu-08; Mon, 31 Oct 2022 09:20:48 -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 1opUhy-00034Y-82 for qemu-devel@nongnu.org; Mon, 31 Oct 2022 09:20:07 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opUht-0005SO-GM for qemu-devel@nongnu.org; Mon, 31 Oct 2022 09:20:05 -0400 Received: by mail-wr1-x42a.google.com with SMTP id cl5so4296164wrb.9 for ; Mon, 31 Oct 2022 06:19:59 -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=BP29Ki6yP/DZbhV0oFjwlgXIaAyAE9rA1CMCqvoccmU=; b=SUpnCi7P9kK8mOJofejpJGpzuyxNtA361HmcTdMiAiXfsm+HTFfpvl30fYoGFzeHAH 5aVThoc2sVsPNhcw/i1Ry9myY6zl2V6tDmHHJJtepSPAWt60BKpwPvPifEjGP88oNB7U oD62w0AxUYkXhNQQRIaHdhcG+brSyuClHCS7dHmMTa+4YC1qvGzNAj99nCR33neGQiBc QnOfcWqqqcvjX/sQqJdPkp369a96hWrrD7k9AFCvLAh4OSJpVccp5AATD1hhoIMTkDu+ SHY1C9DBlKyPmdH0kkz8/az2G65OI/HfMMU6l2G+/opOiyvqbPEqc42fuPJZPrxj1RmL zlQQ== 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=BP29Ki6yP/DZbhV0oFjwlgXIaAyAE9rA1CMCqvoccmU=; b=wDWd8w+eczb8fSc2X75qRWU21wv+7hvVnVTz7tddUZJ//MENN2r0Ir6yGNerg+h07s fdcv9RThXfqIfzNSAZQU8G7Do18Aw7cPwk1tz0lBN5Ud7wXk8PQPXa0lY81Tic6pCTdk Vj5OCjIjCTSTqigbCItn1kUH56/8ieSgbYDfJf5CHPoESLiau+9ApHY4bkhr9Orp7R3M 3SsNvyjpPqtKTGka5eefD29mgAN/uXFj9bOoXKQ/9Hc12oAEW26fr1q+yJ8DCZdAxA1l q9HpZwmLizy3XVSStekTBUrBgkQUcAiSoaEkX6I6iUy9/zlJw8PjtmLZSdR6vZizm9QW HEaw== X-Gm-Message-State: ACrzQf1zAOGZHkPBINXcFNhQxWPA6vEGveAZI9TbpPc7FGyW2xjkexKH f1wqjYiAseDEHVFSgN1hrk7y3A== X-Received: by 2002:adf:e8cb:0:b0:236:7ae2:918e with SMTP id k11-20020adfe8cb000000b002367ae2918emr8214680wrn.613.1667222398726; Mon, 31 Oct 2022 06:19:58 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id d8-20020a5d5388000000b0023672104c24sm7260775wrv.74.2022.10.31.06.19.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 06:19:55 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E03331FFD4; Mon, 31 Oct 2022 13:10:13 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: stefanha@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: [PULL 31/31] tests/vm: use -o IdentitiesOnly=yes for ssh Date: Mon, 31 Oct 2022 13:10:10 +0000 Message-Id: <20221031131010.682984-32-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221031131010.682984-1-alex.bennee@linaro.org> References: <20221031131010.682984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.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+peter.griffin=linaro.org+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 Message-Id: <20221027183637.2772968-31-alex.bennee@linaro.org> 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: