summaryrefslogtreecommitdiffstats
path: root/tests/vm/basevm.py
diff options
context:
space:
mode:
authorIlya Leoshkevich2022-10-27 20:36:36 +0200
committerAlex Bennée2022-10-31 21:37:59 +0100
commit339bf0c071eff5e6ff1d9ddb3ad5cd02e4cd9ca3 (patch)
tree22daea482c7fb074c409a296f0618d165823ff96 /tests/vm/basevm.py
parenttests/unit: cleanups for test-io-channel-command (diff)
downloadqemu-339bf0c071eff5e6ff1d9ddb3ad5cd02e4cd9ca3.tar.gz
qemu-339bf0c071eff5e6ff1d9ddb3ad5cd02e4cd9ca3.tar.xz
qemu-339bf0c071eff5e6ff1d9ddb3ad5cd02e4cd9ca3.zip
tests/vm: use -o IdentitiesOnly=yes for ssh
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 <iii@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20221027113026.2280863-1-iii@linux.ibm.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20221027183637.2772968-31-alex.bennee@linaro.org>
Diffstat (limited to 'tests/vm/basevm.py')
-rw-r--r--tests/vm/basevm.py3
1 files changed, 2 insertions, 1 deletions
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 @@ class BaseVM(object):
"-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: