[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] guix: copy: Use userauth-public-key/auto! for ssh authentifi
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] guix: copy: Use userauth-public-key/auto! for ssh authentification. |
Date: |
Thu, 26 Jan 2017 11:09:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Mathieu Othacehe <address@hidden> 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 whereas
> 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’.