From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAxsO-0002AA-SX for guix-patches@gnu.org; Wed, 17 May 2017 08:16:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAxs2-0000Nf-St for guix-patches@gnu.org; Wed, 17 May 2017 08:16:24 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47001) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dAxs2-0000NQ-F6 for guix-patches@gnu.org; Wed, 17 May 2017 08:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dAxs2-0003Nh-8x for guix-patches@gnu.org; Wed, 17 May 2017 08:16:02 -0400 Subject: bug#26548: [PATCH v2 2/2] install: Enable SSH in installation image. Resent-Message-ID: From: Marius Bakke Date: Wed, 17 May 2017 14:15:17 +0200 Message-Id: <20170517121517.3508-2-mbakke@fastmail.com> In-Reply-To: <20170517121517.3508-1-mbakke@fastmail.com> References: <87ziebd6k2.fsf@fastmail.com> <20170517121517.3508-1-mbakke@fastmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26548@debbugs.gnu.org * gnu/system/install.scm (%installation-services): Add OPENSSH-SERVICE. * doc/guix.texi (Preparing for Installation)[Networking]: Document it. --- doc/guix.texi | 11 +++++++++++ gnu/system/install.scm | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index b272fcec8..9d3b1fb1f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7446,6 +7446,17 @@ ping -c 3 gnu.org Setting up network access is almost always a requirement because the image does not contain all the software and tools that may be needed. +@cindex installing over SSH +From here you can proceed to do the rest of the installation remotely +by starting an SSH server: + +@example +herd start ssh-daemon +@end example + +Make sure to either set a password with @command{passwd}, or configure +OpenSSH public key authentication before logging in. + @subsubsection Disk Partitioning Unless this has already been done, the next step is to partition, and diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 191ccf168..327406b72 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -25,6 +25,7 @@ #:use-module (guix monads) #:use-module ((guix store) #:select (%store-prefix)) #: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 +263,16 @@ You have been warned. Thanks for being so brave. ;; To facilitate copy/paste. (gpm-service) + ;; Add an SSH server to facilitate remote installs. + (service openssh-service-type + (openssh-configuration + (port-number 22) + (permit-root-login #t) + ;; The root account is passwordless, so make sure + ;; a password is set before allowing logins. + (allow-empty-passwords? #f) + (password-authentication? #t))) + ;; 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.13.0