1 Star 0 Fork 123

XuFei/src_openeuler_qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
tests-vm-use-o-IdentitiesOnly-yes-for-ssh.patch 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
yezengruan 提交于 2022-11-22 17:45 . Qemu update to version 6.2.0-59
From 09ebd704c71b855a1c5732d4e4816aa9aed3fe13 Mon Sep 17 00:00:00 2001
From: jianchunfu <jianchunfu_yewu@cmss.chinamobile.com>
Date: Tue, 22 Nov 2022 16:47:27 +0800
Subject: [PATCH 02/29] 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>
Signed-off-by: jianchunfu <jianchunfu_yewu@cmss.chinamobile.com>
---
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 254e11c932..4003bc5fef 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -228,7 +228,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:
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/flyking001/src_openeuler_qemu.git
git@gitee.com:flyking001/src_openeuler_qemu.git
flyking001
src_openeuler_qemu
src_openeuler_qemu
master

搜索帮助