bug#51487: The openssh service does not allow multiple authorized key files per user

2021-11-16 Thread Ludovic Courtès
Hi, Vivien Kraus skribis: > (just fixing the final map function not to forget the user name in the > alist, and removing "spec") Oops, indeed. > From 7bc8abcfd5024f5269c36dc8cb44803eb0ab29ba Mon Sep 17 00:00:00 2001 > From: Vivien Kraus > Date: Fri, 29 Oct 2021 18:25:24 +0200 > Subject:

bug#51487: The openssh service does not allow multiple authorized key files per user

2021-11-15 Thread Vivien Kraus via Bug reports for GNU Guix
Ludovic Courtès writes: > I find it a bit hard to read. What I had in mind is along these lines: > > (match (openssh-authorized-keys config) > (((users _ ...) ...) > ;; Build a user/key-list mapping. > (let ((user-keys (fold (lambda (spec table) >

bug#51487: The openssh service does not allow multiple authorized key files per user

2021-11-15 Thread Ludovic Courtès
Hi, Vivien Kraus skribis: > (define (extend-openssh-authorized-keys config keys) >"Extend CONFIG with the extra authorized keys listed in KEYS." > - (openssh-configuration > - (inherit config) > - (authorized-keys > -(append (openssh-authorized-keys config) keys > + (let

bug#51487: The openssh service does not allow multiple authorized key files per user

2021-11-07 Thread Vivien Kraus via Bug reports for GNU Guix
Hello, Ludovic Courtès writes: > Could you write it in functional style using a vhash (info "(guile) > VHashes")? You’ll probably need two list traversals: one to build the > user/key mapping, and one to compute the list of users. I thought that as the vhash data structure inherited the

bug#51487: The openssh service does not allow multiple authorized key files per user

2021-11-07 Thread Ludovic Courtès
Hi, Vivien Kraus skribis: > From b2f47730a3d9aa97716741134917c340354d9c3a Mon Sep 17 00:00:00 2001 > From: Vivien Kraus > Date: Fri, 29 Oct 2021 18:25:24 +0200 > Subject: [PATCH] gnu: openssh-service: Collect all keys for all users. > > * gnu/services/ssh.scm (extend-openssh-authorized-keys):

bug#51487: The openssh service does not allow multiple authorized key files per user

2021-10-29 Thread Vivien Kraus via Bug reports for GNU Guix
Dear guix, The openssh service is configured with a list of authorized keys, as a list of items, where each item is a list of 2 values, the user name (as a string) and the public key file (a file-like object). The service can be extended with new keys. To have multiple keys per user, we can put