[Top][All Lists]

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

How do I extend openssh-service-type ?

From: Edouard Klein
Subject: How do I extend openssh-service-type ?
Date: Tue, 10 May 2022 23:07:10 +0200
User-agent: mu4e 1.6.10; emacs 27.2

Hi !

I'm trying to make sense of:

This service can be extended with extra authorized keys, as in this example:

(service-extension openssh-service-type
                   (const `(("charlie"
                             ,(local-file "")))))

My goal is to do exactly that: add a public key to a user of an
operating system whose openssh-service-type is already configured

I can do it by going to this "elsewhere" and adding the

("charlie"  ,(local-file ""))

in the authorized-keys field of the openssh-configuration, but when I
try to extend the service, the key is just ignored and does not appear
in /etc/ssh/authorized-keys.d/

I've tried adding a simple-service to the operating-system declaration
like so:

#+begin_src scheme
   (format #f "ssh keys for user ~a" "toto")
    `("toto" ,(local-file ""))))

I also tried the verbose version:

#+begin_src scheme
 (service (service-type
                  (name 'tamereenslip)
                    (service-extension openssh-service-type
                                       (const `(("toto"
"")))))))) #f)

I'm at my wit's end. I could not find any examples online or by grepping
the source code.

Has anybody ever been successful in extending the openssh-service ? If
so, could I please see your code ?



reply via email to

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