GNU bug report logs -
#55359
How do I extend openssh-service-type ?
Previous Next
Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>
Date: Wed, 11 May 2022 07:38:02 UTC
Severity: normal
Done: Oleg Pykhalov <go.wigust <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi,
Edouard Klein <edk <at> beaver-labs.com> writes:
> I'm trying to make sense of:
> https://guix.gnu.org/manual/en/guix.html#index-openssh_002dservice_002dtype
>
> #+begin_quote
> This service can be extended with extra authorized keys, as in this example:
>
> (service-extension openssh-service-type
> (const `(("charlie"
> ,(local-file "charlie.pub")))))
> #+end_quote
[…]
Seems like extend-openssh-authorized-keys procedure does not use keys
argument. We could fix it like:
--8<---------------cut here---------------start------------->8---
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index 7fbbe383e5..4bb3969b95 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -558,7 +558,7 @@ (define (extend-openssh-authorized-keys config keys)
(openssh-configuration
(inherit config)
(authorized-keys
- (match (openssh-configuration-authorized-keys config)
+ (match (append (openssh-configuration-authorized-keys config) keys)
(((users _ ...) ...)
;; Build a user/key-list mapping.
(let ((user-keys (alist->vhash
--8<---------------cut here---------------end--------------->8---
Oleg.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 2 years and 357 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.