Bug 3064

Summary: Place algorithm at head of default list
Product: Portable OpenSSH Reporter: Christian Weisgerber <naddy>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: enhancement CC: djm
Priority: P5    
Version: 8.0p1   
Hardware: Other   
OS: All   
Attachments:
Description Flags
ssh_prefer.diff none

Description Christian Weisgerber 2019-09-05 06:26:39 AEST
Created attachment 3318 [details]
ssh_prefer.diff

ssh_config(5) and sshd_config(5) already allow adding '+' and removing '-' an algorithm from the default list.  Oddly, I mostly find myself wanting to prefer an algorithm, i.e., place it at the head of the list without removing anything.  The attached patch adds this ability.  To prefer algorithms, prefix them with '^'.  E.g.:
 
  HostKeyAlgorithms ^ssh-ed25519
  Ciphers ^aes128-gcm@openssh.com,aes256-gcm@openssh.com
Comment 1 Damien Miller 2019-09-06 13:03:52 AEST
This is ok djm and dtucker if you want to commit it yourself
Comment 2 Christian Weisgerber 2019-09-07 00:56:13 AEST
Committed.
Comment 3 Damien Miller 2021-04-23 14:53:09 AEST
closing resolved bugs as of 8.6p1 release