core: warn if password only on `vagrant ssh`

This commit is contained in:
Mitchell Hashimoto 2014-01-03 10:45:42 -08:00
parent 38e7166a21
commit d1fdee7ae3
2 changed files with 9 additions and 0 deletions

View File

@ -35,6 +35,10 @@ module Vagrant
end
end
if info[:private_key_path].empty? && info[:password]
env[:ui].warn(I18n.t("vagrant.ssh_exec_password"))
end
# Exec!
SSH.exec(info, env[:ssh_opts])
end

View File

@ -77,6 +77,11 @@ en:
%{names}
provisioner_cleanup: |-
Running cleanup tasks for '%{name}' provisioner...
ssh_exec_password: |-
The machine you're attempting to SSH into is configured to use
password-based authentication. Vagrant can't script entering the
password for you. If you're prompted for a password, please enter
the same password you have configured in the Vagrantfile.
cfengine_config:
classes_array: |-