From e30c874a063d6aee9fb51d9773ce567f4ddddda6 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 6 Aug 2021 18:17:21 +0200 Subject: [PATCH] Let NixOps provide known_hosts independently of user known_hosts Companion of https://github.com/NixOS/nixops/pull/1464 --- nixops_aws/backends/ec2.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nixops_aws/backends/ec2.py b/nixops_aws/backends/ec2.py index 986a6a25..8f36b34a 100644 --- a/nixops_aws/backends/ec2.py +++ b/nixops_aws/backends/ec2.py @@ -488,6 +488,18 @@ def _ip_for_ssh_key(self): else: return self.public_ipv4 + def get_ssh_host_keys(self): + return ( + self.private_ipv4 + + " " + + self.public_host_key + + "\n" + + self.public_ipv4 + + " " + + self.public_host_key + + "\n" + ) + def _booted_from_ebs(self): return self.root_device_type == "ebs"