From a8d5e3e39679477c5171973bfb8ddfbe09e69e06 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Tue, 4 Feb 2025 19:51:19 +0000 Subject: [PATCH] add hosts' SSH keys to known_hosts --- peering.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/peering.nix b/peering.nix index b25f215..fb251c7 100644 --- a/peering.nix +++ b/peering.nix @@ -132,5 +132,12 @@ in ++ optionals host.isRouter [ "10.127.0.0/16" "fd70:81ca:0f8f::/48" ]; }; }; + + services.openssh.knownHosts = builtins.map + (name: host: { + publicKey = host.hostKey; + hostNames = [ host.ipv4 host.ipv6 ]; + }) + hosts; }; }