File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -224,11 +224,12 @@ def key_from_env(passphrase=None):
224224
225225 if 'key' in env :
226226 if output .debug :
227- # NOTE: this may not be the most secure thing; OTOH anybody running
228- # the process must by definition have access to the key value,
229- # so only serious problem is if they're logging the output.
230- sys .stderr .write ("Trying to honor in-memory key %r\n " % env .key )
231- for pkey_class in (ssh .rsakey .RSAKey , ssh .dsskey .DSSKey ):
227+ sys .stderr .write ("Trying to honor in-memory env.key %.66r...\n " % env .key )
228+
229+ for pkey_type in ['Ed25519Key' , 'ECDSAKey' , 'RSAKey' , 'DSSKey' ]:
230+ pkey_class = getattr (ssh , pkey_type , None )
231+ if pkey_class is None :
232+ continue
232233 if output .debug :
233234 sys .stderr .write ("Trying to load it as %s\n " % pkey_class )
234235 try :
@@ -243,6 +244,9 @@ def key_from_env(passphrase=None):
243244 else :
244245 pass
245246
247+ if output .debug :
248+ sys .stderr .write ("Failed to load env.key\n " )
249+
246250
247251def parse_host_string (host_string ):
248252 # Split host_string to user (optional) and host/port
You can’t perform that action at this time.
0 commit comments