diff mbox series

[bug#70249] gnu: open-ssh-session: Don’t require public key.

Message ID b26edae0cd07082f812c6ab65d934ece9d0d3a4f.1712445373.git.ian@retrospec.tv
State New
Headers show
Series [bug#70249] gnu: open-ssh-session: Don’t require public key. | expand

Commit Message

Ian Eure April 6, 2024, 11:17 p.m. UTC
* guix/scripts/offload.scm (open-ssh-session): Delete `public' binding.
Public keys aren’t required for client connections, and this binding is
unused.  The behavior of assuming a ".pub"-suffixed file exists in the same
directory as the secret key is undocumented and surprising.

Change-Id: I9b532be2abe68dae0323e4ef6e1ceab1e5603359
---
 guix/scripts/offload.scm | 3 ---
 1 file changed, 3 deletions(-)


base-commit: ab3731d255ff1ac8d6874bc0f68ad94f21f08e79

Comments

Christopher Baines April 7, 2024, 7:32 p.m. UTC | #1
Ian Eure <ian@retrospec.tv> writes:

> * guix/scripts/offload.scm (open-ssh-session): Delete `public' binding.
> Public keys aren’t required for client connections, and this binding is
> unused.  The behavior of assuming a ".pub"-suffixed file exists in the same
> directory as the secret key is undocumented and surprising.
>
> Change-Id: I9b532be2abe68dae0323e4ef6e1ceab1e5603359
> ---
>  guix/scripts/offload.scm | 3 ---
>  1 file changed, 3 deletions(-)

I can't see how this binding is used either, so I've pushed this to
master as 298aed72a2a76be33f9a55bed22636acd7a4f9b9.

Chris
diff mbox series

Patch

diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index 137e3b5fe3..93e9d3759c 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -213,9 +213,6 @@  (define* (open-ssh-session machine #:optional max-silent-time)
 When MAX-SILENT-TIME is true, it must be a positive integer denoting the
 number of seconds after which the connection times out."
   (let ((private (private-key-from-file* (build-machine-private-key machine)))
-        (public  (public-key-from-file
-                  (string-append (build-machine-private-key machine)
-                                 ".pub")))
         (session (make-session #:user (build-machine-user machine)
                                #:host (build-machine-name machine)
                                #:port (build-machine-port machine)