diff options
| author | Marius Bakke <mbakke@fastmail.com> | 2017-04-17 22:49:23 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2017-05-20 10:16:37 +0200 |
| commit | f3f8938fe0c07d221ebccdf5a9a0029fda01f036 (patch) | |
| tree | 2396fe120e4c2ed15c9734902c240c44c8a81f9a | |
| parent | e13b55ae797c8da2b06811d25e21abd173295b8d (diff) | |
install: Enable SSH in installation image.
* gnu/system/install.scm (%installation-services): Add OPENSSH-SERVICE-TYPE.
* doc/guix.texi (Preparing for Installation)[Networking]: Document it.
| -rw-r--r-- | doc/guix.texi | 14 | ||||
| -rw-r--r-- | gnu/system/install.scm | 12 |
2 files changed, 25 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 3523937030f..12fc806e17c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -36,7 +36,8 @@ Copyright @copyright{} 2017 Federico Beffa@* | |||
| 36 | Copyright @copyright{} 2017 Carlo Zancanaro@* | 36 | Copyright @copyright{} 2017 Carlo Zancanaro@* |
| 37 | Copyright @copyright{} 2017 Thomas Danckaert@* | 37 | Copyright @copyright{} 2017 Thomas Danckaert@* |
| 38 | Copyright @copyright{} 2017 humanitiesNerd@* | 38 | Copyright @copyright{} 2017 humanitiesNerd@* |
| 39 | Copyright @copyright{} 2017 Christopher Allan Webber | 39 | Copyright @copyright{} 2017 Christopher Allan Webber@* |
| 40 | Copyright @copyright{} 2017 Marius Bakke | ||
| 40 | 41 | ||
| 41 | Permission is granted to copy, distribute and/or modify this document | 42 | Permission is granted to copy, distribute and/or modify this document |
| 42 | under the terms of the GNU Free Documentation License, Version 1.3 or | 43 | under the terms of the GNU Free Documentation License, Version 1.3 or |
| @@ -7452,6 +7453,17 @@ ping -c 3 gnu.org | |||
| 7452 | Setting up network access is almost always a requirement because the | 7453 | Setting up network access is almost always a requirement because the |
| 7453 | image does not contain all the software and tools that may be needed. | 7454 | image does not contain all the software and tools that may be needed. |
| 7454 | 7455 | ||
| 7456 | @cindex installing over SSH | ||
| 7457 | If you want to, you can continue the installation remotely by starting | ||
| 7458 | an SSH server: | ||
| 7459 | |||
| 7460 | @example | ||
| 7461 | herd start ssh-daemon | ||
| 7462 | @end example | ||
| 7463 | |||
| 7464 | Make sure to either set a password with @command{passwd}, or configure | ||
| 7465 | OpenSSH public key authentication before logging in. | ||
| 7466 | |||
| 7455 | @subsubsection Disk Partitioning | 7467 | @subsubsection Disk Partitioning |
| 7456 | 7468 | ||
| 7457 | Unless this has already been done, the next step is to partition, and | 7469 | 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 191ccf1680e..9a6febfeba7 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | ;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> | 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
| 4 | ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> | 4 | ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> |
| 5 | ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> | ||
| 5 | ;;; | 6 | ;;; |
| 6 | ;;; This file is part of GNU Guix. | 7 | ;;; This file is part of GNU Guix. |
| 7 | ;;; | 8 | ;;; |
| @@ -25,6 +26,7 @@ | |||
| 25 | #:use-module (guix monads) | 26 | #:use-module (guix monads) |
| 26 | #:use-module ((guix store) #:select (%store-prefix)) | 27 | #:use-module ((guix store) #:select (%store-prefix)) |
| 27 | #:use-module (gnu services shepherd) | 28 | #:use-module (gnu services shepherd) |
| 29 | #:use-module (gnu services ssh) | ||
| 28 | #:use-module (gnu packages admin) | 30 | #:use-module (gnu packages admin) |
| 29 | #:use-module (gnu packages bash) | 31 | #:use-module (gnu packages bash) |
| 30 | #:use-module (gnu packages bootloaders) | 32 | #:use-module (gnu packages bootloaders) |
| @@ -262,6 +264,16 @@ You have been warned. Thanks for being so brave. | |||
| 262 | ;; To facilitate copy/paste. | 264 | ;; To facilitate copy/paste. |
| 263 | (gpm-service) | 265 | (gpm-service) |
| 264 | 266 | ||
| 267 | ;; Add an SSH server to facilitate remote installs. | ||
| 268 | (service openssh-service-type | ||
| 269 | (openssh-configuration | ||
| 270 | (port-number 22) | ||
| 271 | (permit-root-login #t) | ||
| 272 | ;; The root account is passwordless, so make sure | ||
| 273 | ;; a password is set before allowing logins. | ||
| 274 | (allow-empty-passwords? #f) | ||
| 275 | (password-authentication? #t))) | ||
| 276 | |||
| 265 | ;; Since this is running on a USB stick with a unionfs as the root | 277 | ;; Since this is running on a USB stick with a unionfs as the root |
| 266 | ;; file system, use an appropriate cache configuration. | 278 | ;; file system, use an appropriate cache configuration. |
| 267 | (nscd-service (nscd-configuration | 279 | (nscd-service (nscd-configuration |
