mitchellh / nixos-config

My NixOS configurations.
https://twitter.com/mitchellh/status/1346136404682625024
MIT License
1.93k stars 191 forks source link

Fixes #3 #4

Closed klivan closed 2 years ago

klivan commented 2 years ago

This fixes issue #3

Adding -o PubkeyAuthentication=no ssh option we won't even try to offer ssh keys since we're using password auth for bootstrapping. So even if you have more than 5 ssh keys it should work.

By adding -o StrictHostKeyChecking=no we are eliminating the annoying message Are you sure you want to continue connecting (yes/no/[fingerprint])?. It's not very secure, but for bootstrapping only I think it should be ok.

By adding -o UserKnownHostsFile=/dev/null we make sure that even after a reboot (between vm/bootstrap0 and vm/bootstrap steps, when ssh key on the VM gets regenerated) we can log in to the VM without removing a record from ~/.ssh/known_hosts

mitchellh commented 2 years ago

This is helpful thanks. I'll add a comment to explain this.