From a76594ab4d865792e53a9f40ad0dfc2c5f717059 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 13 Oct 2022 12:41:55 +0000 Subject: [PATCH] kexec: fix authorized_keys on debian --- nix/kexec-installer.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/kexec-installer.nix b/nix/kexec-installer.nix index 8539740..6877bbb 100644 --- a/nix/kexec-installer.nix +++ b/nix/kexec-installer.nix @@ -20,7 +20,8 @@ mkdir -p initrd/ssh pushd initrd if [ -e /root/.ssh/authorized_keys ]; then - cat /root/.ssh/authorized_keys >> ssh/authorized_keys + # workaround for debian shenanigans + grep -o '\(ssh-[^ ]* .*\)' /root/.ssh/authorized_keys >> ssh/authorized_keys fi if [ -e /etc/ssh/authorized_keys.d/root ]; then cat /etc/ssh/authorized_keys.d/root >> ssh/authorized_keys