From 8547b70b58158b751a834d90cecf9ab3fd25dd13 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Sat, 17 Feb 2024 10:49:31 -0500 Subject: [PATCH] orchestra/connection: support alternate ssh config path Allow the configuration to specify a `ssh_config_path` parameter. In my "lab" setup I populate a custom ssh-config rather than constantly adding and removing entries from my "real" ssh config file. Signed-off-by: John Mulligan --- teuthology/orchestra/connection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/teuthology/orchestra/connection.py b/teuthology/orchestra/connection.py index 785a8c5ed..4e6b042bf 100644 --- a/teuthology/orchestra/connection.py +++ b/teuthology/orchestra/connection.py @@ -80,7 +80,8 @@ def connect(user_at_host, host_key=None, keep_alive=False, timeout=60, ) key_filename = key_filename or config.ssh_key - ssh_config_path = os.path.expanduser("~/.ssh/config") + ssh_config_path = config.ssh_config_path or "~/.ssh/config" + ssh_config_path = os.path.expanduser(ssh_config_path) if not key_filename and os.path.exists(ssh_config_path): ssh_config = paramiko.SSHConfig() ssh_config.parse(open(ssh_config_path)) -- 2.47.3