File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -205,17 +205,18 @@ def _create_paramiko_client(self, base_url):
205
205
with open (ssh_config_file ) as f :
206
206
conf .parse (f )
207
207
host_config = conf .lookup (base_url .hostname )
208
- self .ssh_conf = host_config
209
208
if 'proxycommand' in host_config :
210
209
self .ssh_params ["sock" ] = paramiko .ProxyCommand (
211
210
self .ssh_conf ['proxycommand' ]
212
211
)
213
212
if 'hostname' in host_config :
214
213
self .ssh_params ['hostname' ] = host_config ['hostname' ]
215
214
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' ]
217
216
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' ]
219
220
220
221
self .ssh_client .load_system_host_keys ()
221
222
self .ssh_client .set_missing_host_key_policy (paramiko .WarningPolicy ())
You can’t perform that action at this time.
0 commit comments