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 <jmulligan@redhat.com>
)
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))