guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] guix: copy: Use userauth-public-key/auto! for ssh authentificati


From: Mathieu Othacehe
Subject: [PATCH] guix: copy: Use userauth-public-key/auto! for ssh authentification.
Date: Wed, 25 Jan 2017 22:34:33 +0100

* 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]