communicators/ssh: output UI when inserting key

This commit is contained in:
Mitchell Hashimoto 2014-01-03 11:22:05 -08:00
parent 074bb2c7fb
commit 54e640b0c9
2 changed files with 6 additions and 1 deletions

View File

@ -60,6 +60,7 @@ module VagrantPlugins
ssh_info = @machine.ssh_info
if ssh_info[:password] && ssh_info[:private_key_path].empty?
@logger.info("Inserting insecure key to avoid password")
@machine.ui.info(I18n.t("vagrant.inserting_insecure_key"))
@machine.guest.capability(
:insert_public_key,
Vagrant.source_root.join("keys", "vagrant.pub").read)
@ -70,7 +71,7 @@ module VagrantPlugins
f.write(Vagrant.source_root.join("keys", "vagrant").read)
end
@logger.info("Disconecting SSH so we can reconnect with new SSH key")
@machine.ui.info(I18n.t("vagrant.inserted_key"))
@connection.close
@connection = nil

View File

@ -58,6 +58,10 @@ en:
docker_install_with_version_not_supported: |-
Vagrant is not capable of installing an specific version of Docker
onto the guest machine and the latest version will be installed.
inserted_key: |-
Key inserted! Disconnecting and reconnecting using new SSH key...
inserting_insecure_key: |-
Inserting Vagrant public key within guest...
plugin_needs_reinstall: |-
The following plugins were installed with a version of Vagrant
that had different versions of underlying components. Because