* [PATCH] guix: copy: Use userauth-public-key/auto! for ssh authentification.
@ 2017-01-25 21:34 Mathieu Othacehe
2017-01-25 21:36 ` Mathieu OTHACEHE
2017-01-26 10:09 ` Ludovic Courtès
0 siblings, 2 replies; 3+ messages in thread
From: Mathieu Othacehe @ 2017-01-25 21:34 UTC (permalink / raw)
To: guix-devel
* 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)
('success
session)
(x
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] guix: copy: Use userauth-public-key/auto! for ssh authentification.
2017-01-25 21:34 [PATCH] guix: copy: Use userauth-public-key/auto! for ssh authentification Mathieu Othacehe
@ 2017-01-25 21:36 ` Mathieu OTHACEHE
2017-01-26 10:09 ` Ludovic Courtès
1 sibling, 0 replies; 3+ messages in thread
From: Mathieu OTHACEHE @ 2017-01-25 21:36 UTC (permalink / raw)
To: guix-devel
> 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.
And I forget to mention that I wasn't running ssh-agent ...
Sorry,
Mathieu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] guix: copy: Use userauth-public-key/auto! for ssh authentification.
2017-01-25 21:34 [PATCH] guix: copy: Use userauth-public-key/auto! for ssh authentification Mathieu Othacehe
2017-01-25 21:36 ` Mathieu OTHACEHE
@ 2017-01-26 10:09 ` Ludovic Courtès
1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2017-01-26 10:09 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: guix-devel
Mathieu Othacehe <m.othacehe@gmail.com> 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’.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-26 10:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-25 21:34 [PATCH] guix: copy: Use userauth-public-key/auto! for ssh authentification Mathieu Othacehe
2017-01-25 21:36 ` Mathieu OTHACEHE
2017-01-26 10:09 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).