Parece que Vagrant genera un nuevo par de claves si detecta las inseguras. ¿Es posible prevenir ese comportamiento?
5
Sí :
# By default, Vagrant 1.7+ automatically inserts a different
# insecure keypair for each new VM created. The easiest way
# to use the same keypair for all the machines is to disable
# this feature and rely on the legacy insecure key.
config.ssh.insert_key = false
Por ejemplo ... Mi actual "prueba rápida" de Vagrantfile se ve así:
C:\Users\monsterkill\vagrant>cat Vagrantfile
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.insert_key = false
config.vm.define "vagrant1" do |vagrant1|
vagrant1.vm.box = "ubuntu/trusty64"
vagrant1.vm.network "forwarded_port", guest: 80, host: 8080
vagrant1.vm.network "forwarded_port", guest: 443, host: 8443
vagrant1.vm.network "private_network", ip: "192.168.33.10"
end
end
Sí, añadiendo esta única línea.
config.ssh.insert_key = false
Aquí está la muestra:
fuente