nix-community / nixops-gce

NixOps Google Cloud Backend
25 stars 7 forks source link

Add GCEState.get_ssh_host_keys #22

Open roberth opened 3 years ago

roberth commented 3 years ago

This will let NixOps provide the host keys directly to the ssh client, regardless of whether they've been saved to user dotfiles.

It solves a problem where the host keys were not known on systems that retrieve the state from a remote state provider.

See https://github.com/NixOS/nixops/pull/1464

I haven't tested this yet. It can be tested by removing entries from ~/.ssh/known_hosts and then calling nixops ssh. It should still recognize the host key, as it is stored in the nixops state.