From 318fc516d1d87410fd06178331a9b2939b9f2fef Mon Sep 17 00:00:00 2001 From: Jairo Llopis <973709+yajo@users.noreply.github.com> Date: Mon, 11 Jul 2022 18:25:21 +0100 Subject: [PATCH] feat: respect old machine ssh host keys (#107) When lustrating another machine, you usually are already connected by SSH. Thus, you usually already trusted that machine's keys. With this patch, those keys are kept, so after booting into nixos, you still connect to the same trusted IP+Keys combination. @moduon MT-904 --- nixos-infect | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos-infect b/nixos-infect index 23adc27..454bac6 100755 --- a/nixos-infect +++ b/nixos-infect @@ -309,6 +309,7 @@ infect() { echo etc/nixos >> /etc/NIXOS_LUSTRATE echo etc/resolv.conf >> /etc/NIXOS_LUSTRATE echo root/.nix-defexpr/channels >> /etc/NIXOS_LUSTRATE + (cd / && ls etc/ssh/ssh_host_*_key* || true) >> /etc/NIXOS_LUSTRATE rm -rf /boot.bak isEFI && umount "$esp"