Merge "Stop using system SSH config files by default."

This commit is contained in:
Zuul 2020-03-16 08:29:08 +00:00 committed by Gerrit Code Review
commit d0b7954c04
2 changed files with 2 additions and 2 deletions

View File

@ -34,8 +34,7 @@ OPTIONS = [
default=None,
help=('Default SSH username')),
cfg.ListOpt('config_files',
default=['/etc/ssh/ssh_config', '~/.ssh/config',
'./ssh_config'],
default=['ssh_config'],
help="Default user SSH configuration files"),
cfg.StrOpt('key_file',
default='~/.ssh/id_rsa',

View File

@ -58,6 +58,7 @@ class SSHClientFixtureTest(unit.TobikoUnitTest):
ssh_config = paramiko.SSHConfig()
for ssh_config_file in CONF.tobiko.ssh.config_files:
ssh_config_file = tobiko.tobiko_config_path(ssh_config_file)
if os.path.exists(ssh_config_file):
with open(ssh_config_file) as f:
ssh_config.parse(f)