--- Begin Message ---
Subject: |
[PATCH] install: Enable SSH in installation image. |
Date: |
Mon, 17 Apr 2017 23:30:30 +0200 |
Hi Guix! This patch adds an SSH server to the installation image
to aid remote installations as requested in
https://lists.gnu.org/archive/html/help-guix/2017-01/msg00047.html
lsh-service depends on networking, so I pulled in a DHCP client too.
It increases the image size by about 29MiB.
* gnu/system/install.scm (%installation-services): Add DHCP-CLIENT-SERVICE
and LSH-SERVICE.
---
gnu/system/install.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 191ccf168..95904f151 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -24,7 +24,9 @@
#:use-module (guix store)
#:use-module (guix monads)
#:use-module ((guix store) #:select (%store-prefix))
+ #:use-module (gnu services networking)
#:use-module (gnu services shepherd)
+ #:use-module (gnu services ssh)
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
#:use-module (gnu packages bootloaders)
@@ -262,6 +264,17 @@ You have been warned. Thanks for being so brave.
;; To facilitate copy/paste.
(gpm-service)
+ ;; Add a DHCP client for networking.
+ (dhcp-client-service)
+
+ ;; Add an SSH server to facilitate remote installs.
+ (lsh-service #:port-number 22
+ #:root-login? #t
+ #:password-authentication? #t
+ ;; The root account is passwordless, so make sure
+ ;; a password is set before allowing logins.
+ #:allow-empty-passwords? #f)
+
;; Since this is running on a USB stick with a unionfs as the root
;; file system, use an appropriate cache configuration.
(nscd-service (nscd-configuration
--
2.12.2
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#26548: [PATCH v2 2/2] install: Enable SSH in installation image. |
Date: |
Thu, 18 May 2017 01:01:19 +0200 |
User-agent: |
Notmuch/0.24.1 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) |
Ludovic Courtès <address@hidden> writes:
> Marius Bakke <address@hidden> skribis:
>
>> * gnu/system/install.scm (%installation-services): Add OPENSSH-SERVICE.
>> * doc/guix.texi (Preparing for Installation)[Networking]: Document it.
>
> [...]
>
>> address@hidden installing over SSH
>> +From here you can proceed to do the rest of the installation remotely
>> +by starting an SSH server:
>
> Maybe s/From here/If you want to, / to clarify that people are not
> required to do this?
Thanks, fixed!
> Otherwise LGTM!
>
> How does this affect:
>
> guix size $(./pre-inst-env guix system build gnu/system/install.scm)
Before: 882.1MiB
After: 910.0MiB
"make check-system TESTS=openssh" passes. Pushed!
signature.asc
Description: PGP signature
--- End Message ---