File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,11 +208,14 @@ def handle_ssh_pubkey(data):
208208 data .ssh_pubkey_used = bool (data .ssh_pubkey )
209209 if not data .ssh_pubkey :
210210 home_dir = os .path .expanduser ('~' )
211- user_default_key = f'{ home_dir } /.ssh/id_rsa.pub'
212- if os .path .isfile (user_default_key ):
213- data .ssh_pubkey = user_default_key
214- with open (data .ssh_pubkey ) as f :
215- data .pub_key_content = f .readline ().rstrip ()
211+ key_types = ['ed25519' , 'rsa' ,]
212+ for key_type in key_types :
213+ user_default_key = f'{ home_dir } /.ssh/id_{ key_type } .pub'
214+ if os .path .isfile (user_default_key ):
215+ data .ssh_pubkey = user_default_key
216+ with open (data .ssh_pubkey ) as f :
217+ data .pub_key_content = f .readline ().rstrip ()
218+ return
216219 else :
217220 err ('SSH public key was not found or informed by "--ssh-pubkey" option.' )
218221
You can’t perform that action at this time.
0 commit comments