-
-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Description
My custom installer ISO has authorized keys for the nixos user set via users.users.nixos.openssh.authorizedKeys.keys but none for root.
In such cases it would be helpful if nixos-anywhere would additionally try to copy over the authorized_keys file from /etc/ssh/authorized_keys.d/$USER.
nixos-anywhere/src/nixos-anywhere.sh
Lines 1030 to 1036 in e86fad4
| # Installation will fail if non-root user is used for installer. | |
| # Switch to root user by copying authorized_keys. | |
| if [[ ${isInstaller} == "y" ]] && [[ ${sshUser} != "root" ]]; then | |
| # Allow copy to fail if authorized_keys does not exist, like if using /etc/ssh/authorized_keys.d/ | |
| runSsh "${maybeSudo} mkdir -p /root/.ssh; ${maybeSudo} cp ~/.ssh/authorized_keys /root/.ssh || true" | |
| sshConnection="root@${sshHost}" | |
| fi |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels