From owner-freebsd-questions@freebsd.org Tue Nov 19 18:00:14 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A41A1B9968 for ; Tue, 19 Nov 2019 18:00:14 +0000 (UTC) (envelope-from news@mips.inka.de) Received: from mail.inka.de (mail.inka.de [IPv6:2a04:c9c7:0:1073:217:a4ff:fe3b:e77c]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47HYWd5QHNz3Gmm for ; Tue, 19 Nov 2019 18:00:13 +0000 (UTC) (envelope-from news@mips.inka.de) Received: from mips.inka.de (news@[127.0.0.1]) by mail.inka.de with uucp (rmailwrap 0.5) id 1iX7nJ-0005NV-MK; Tue, 19 Nov 2019 19:00:05 +0100 Received: from lorvorc.mips.inka.de (localhost [127.0.0.1]) by lorvorc.mips.inka.de (8.15.2/8.15.2) with ESMTP id xAJHvt6r029177 for ; Tue, 19 Nov 2019 18:57:55 +0100 (CET) (envelope-from news@lorvorc.mips.inka.de) Received: (from news@localhost) by lorvorc.mips.inka.de (8.15.2/8.15.2/Submit) id xAJHvtjg029176 for freebsd-questions@freebsd.org; Tue, 19 Nov 2019 18:57:55 +0100 (CET) (envelope-from news) To: freebsd-questions@freebsd.org From: Christian Weisgerber Newsgroups: list.freebsd.questions Subject: Re: Change openssh private key order Date: Tue, 19 Nov 2019 17:57:55 -0000 (UTC) Message-ID: References: <373c4623-d68b-7097-c532-288089df770a@bluerosetech.com> User-Agent: slrn/1.0.3 (FreeBSD) X-Rspamd-Queue-Id: 47HYWd5QHNz3Gmm X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of news@mips.inka.de has no SPF policy when checking 2a04:c9c7:0:1073:217:a4ff:fe3b:e77c) smtp.mailfrom=news@mips.inka.de X-Spamd-Result: default: False [3.67 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_MEDIUM(0.94)[0.944,0]; NEURAL_SPAM_LONG(0.99)[0.988,0]; DMARC_NA(0.00)[inka.de]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[naddy@mips.inka.de,news@mips.inka.de]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:202113, ipnet:2a04:c9c7::/32, country:DE]; FROM_NEQ_ENVFROM(0.00)[naddy@mips.inka.de,news@mips.inka.de]; IP_SCORE(0.53)[ip: (1.41), ipnet: 2a04:c9c7::/32(0.71), asn: 202113(0.57), country: DE(-0.01)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Nov 2019 18:00:14 -0000 On 2019-11-07, Mel Pilgrim wrote: > I have rsa keys and an ed25519 keys. They're both made available via an > ssh-agent. All keys are in the authorized_keys files of the servers in > question except for a few legacy cases that only have the rsa keys due > to lacking ed25519 support. > > I want the connections to prefer the ed25519 keys over the rsa keys, but > looking at debug output, the RSA keys are always tried first. The keys are offered to the remote host in the order in which they are held in ssh-agent. If you load the Ed25519 key first... $ ssh-add .ssh/id_ed25519 .ssh/id_rsa ... it will be preferred over the RSA key. -- Christian "naddy" Weisgerber naddy@mips.inka.de