From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] guix: copy: Use userauth-public-key/auto! for ssh authentification. Date: Thu, 26 Jan 2017 11:09:22 +0100 Message-ID: <87poja3zfx.fsf@gnu.org> References: <20170125213433.12933-1-m.othacehe@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWgzi-0004fD-6w for guix-devel@gnu.org; Thu, 26 Jan 2017 05:09:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWgzd-000384-7U for guix-devel@gnu.org; Thu, 26 Jan 2017 05:09:30 -0500 In-Reply-To: <20170125213433.12933-1-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Wed, 25 Jan 2017 22:34:33 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Mathieu Othacehe Cc: guix-devel@gnu.org Mathieu Othacehe skribis: > * guix/scripts/copy.scm (open-ssh-session): Replace userauth-agent! by > userauth-public-key/auto!. This way, if ssh-agent is not run, > default ssh key (~/.ssh/id_rsa) will be used as a fallback. > --- > Hi, > > I was surprised to see guix copy unable to authenticate to my servers whe= reas > guix offload is working. It's because guix offload uses ~/.ssh/id_rsa as a > fallback and guix copy doesn't. > > With this patch we can keep using ssh-agent in priority > but fallback to default ssh keys if ssh-agent is not started. > > Thanks, > > Mathieu > > guix/scripts/copy.scm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/guix/scripts/copy.scm b/guix/scripts/copy.scm > index 9ae204e6c..89f430d81 100644 > --- a/guix/scripts/copy.scm > +++ b/guix/scripts/copy.scm > @@ -64,7 +64,7 @@ Throw an error on failure." > (match (connect! session) > ('ok > ;; Let the SSH agent authenticate us to the server. > - (match (userauth-agent! session) > + (match (userauth-public-key/auto! session) Good idea. I updated the comment above and committed, thank you! Ludo=E2=80=99.