File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,17 +205,18 @@ def _create_paramiko_client(self, base_url):
205205 with open (ssh_config_file ) as f :
206206 conf .parse (f )
207207 host_config = conf .lookup (base_url .hostname )
208- self .ssh_conf = host_config
209208 if 'proxycommand' in host_config :
210209 self .ssh_params ["sock" ] = paramiko .ProxyCommand (
211210 self .ssh_conf ['proxycommand' ]
212211 )
213212 if 'hostname' in host_config :
214213 self .ssh_params ['hostname' ] = host_config ['hostname' ]
215214 if base_url .port is None and 'port' in host_config :
216- self .ssh_params ['port' ] = self . ssh_conf ['port' ]
215+ self .ssh_params ['port' ] = host_config ['port' ]
217216 if base_url .username is None and 'user' in host_config :
218- self .ssh_params ['username' ] = self .ssh_conf ['user' ]
217+ self .ssh_params ['username' ] = host_config ['user' ]
218+ if 'identityfile' in host_config :
219+ self .ssh_params ['key_filename' ] = host_config ['identityfile' ]
219220
220221 self .ssh_client .load_system_host_keys ()
221222 self .ssh_client .set_missing_host_key_policy (paramiko .WarningPolicy ())
You can’t perform that action at this time.
0 commit comments