From 03ef04f0a40c1be907fd6f0a70891f8317c04d77 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Mon, 23 Jan 2017 22:15:59 +0100 Subject: [PATCH] install-device: permit root login with password Allow password login to the installation this allows doing remote installation via SSH. All that need to be done on the local machine is: 1. Boot from the installation media 2. Set a password with passwd 3. Enable SSH with systemctl start sshd It is safe as root doesn't have a password by default and SSH is disabled by default. Fixes #20718 --- nixos/modules/profiles/installation-device.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/modules/profiles/installation-device.nix b/nixos/modules/profiles/installation-device.nix index 91c718559ed7..af3ef77e99c7 100644 --- a/nixos/modules/profiles/installation-device.nix +++ b/nixos/modules/profiles/installation-device.nix @@ -46,7 +46,12 @@ with lib; ''; # Allow sshd to be started manually through "start sshd". - services.openssh.enable = true; + services.openssh = { + enable = true; + # Allow password login to the installation, if the user sets a password via "passwd" + # It is safe as root doesn't have a password by default and SSH is disabled by default + permitRootLogin = "yes"; + }; systemd.services.sshd.wantedBy = mkOverride 50 []; # Enable wpa_supplicant, but don't start it by default.