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)]
Your bug report
#55359: How do I extend openssh-service-type ?
which was filed against the guix package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 55359 <at> debbugs.gnu.org.
--
55359: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55359
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hi,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Oleg Pykhalov <go.wigust <at> gmail.com> skribis:
>
>> Seems like extend-openssh-authorized-keys procedure does not use keys
>> argument. We could fix it like:
>>
>> 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
>
> Indeed. Please push!
Pushed as 1f29ed4a812f86c45e2d9c37fd9f80f6d0418293.
> 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
Edouard, you should be able to extend the service after the ‘guix pull’.
Oleg.
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
[Message part 6 (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.