nixpkgs/nixos/doc/manual/installation
Jörg Thalheim a5872edf2f
nixos/installer: enable sshd by default
Right now the UX for installing NixOS on a headless system is very bad.
To enable sshd without physical steps users have to have either physical
access or need to be very knowledge-able to figure out how to modify the
installation image by hand to put an `sshd.service` symlink in the
right directory in /nix/store. This is in particular a problem on ARM
SBCs (single board computer) but also other hardware where network is
the only meaningful way to access the hardware.

This commit enables sshd by default. This does not give anyone access to
the NixOS installer since by default. There is no user with a non-empty
password or key. It makes it easy however to add ssh keys to the
installation image (usb stick, sd-card on arm boards) by simply mounting
it and adding a keys to `/root/.ssh/authorized_keys`.
Importantly this should not require nix/nixos on the machine that
prepare the installation device and even feasiable on non-linux systems
by using ext4 third party drivers.

Potential new threats: Since this enables sshd by default a
potential bug in openssh could lead to remote code execution. Openssh
has a very good track-record over the last 20 years, which makes it
far more likely that Linux itself would have a remote code execution
vulnerability. It is trusted by millions of servers on many operating
systems to be exposed to the internet by default.

Co-authored-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
2020-09-06 20:26:08 +02:00
..
changing-config.xml nixos/doc: convert loaOf options refs to attrsOf 2020-09-02 00:42:51 +02:00
installation.xml nixos/manual: add dummy ids to silence warnings 2019-02-08 10:23:57 +01:00
installing-behind-a-proxy.xml specialisation: replace nesting with named configurations 2020-04-12 08:12:50 -04:00
installing-from-other-distro.xml nixos/doc: convert loaOf options refs to attrsOf 2020-09-02 00:42:51 +02:00
installing-pxe.xml netboot: docs: building netboot should specify an arch (#75116) 2020-07-21 19:26:02 +02:00
installing-usb.xml doc: Use prompt more often 2019-06-17 13:25:50 +02:00
installing-virtualbox-guest.xml nixos/manual: recommend VMSVGA as graphics adapter 2020-06-17 18:43:27 +02:00
installing.xml nixos/installer: enable sshd by default 2020-09-06 20:26:08 +02:00
obtaining.xml treewide: use https for nixos.org and hydra.nixos.org 2020-05-03 22:14:21 -07:00
upgrading.xml nixos/manual: 19.09 -> 20.03 2020-04-17 12:41:24 -04:00