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 @@ -202,17 +202,18 @@ def _create_paramiko_client(self, base_url):
202
202
with open (ssh_config_file ) as f :
203
203
conf .parse (f )
204
204
host_config = conf .lookup (base_url .hostname )
205
- self .ssh_conf = host_config
206
205
if 'proxycommand' in host_config :
207
206
self .ssh_params ["sock" ] = paramiko .ProxyCommand (
208
207
self .ssh_conf ['proxycommand' ]
209
208
)
210
209
if 'hostname' in host_config :
211
210
self .ssh_params ['hostname' ] = host_config ['hostname' ]
212
211
if base_url .port is None and 'port' in host_config :
213
- self .ssh_params ['port' ] = self . ssh_conf ['port' ]
212
+ self .ssh_params ['port' ] = host_config ['port' ]
214
213
if base_url .username is None and 'user' in host_config :
215
- self .ssh_params ['username' ] = self .ssh_conf ['user' ]
214
+ self .ssh_params ['username' ] = host_config ['user' ]
215
+ if 'identityfile' in host_config :
216
+ self .ssh_params ['key_filename' ] = host_config ['identityfile' ]
216
217
217
218
self .ssh_client .load_system_host_keys ()
218
219
self .ssh_client .set_missing_host_key_policy (paramiko .WarningPolicy ())
You can’t perform that action at this time.
0 commit comments