diff --git a/lib/vagrant/ssh.rb b/lib/vagrant/ssh.rb index 3a5f24487..a0397785d 100644 --- a/lib/vagrant/ssh.rb +++ b/lib/vagrant/ssh.rb @@ -48,7 +48,10 @@ module Vagrant Net::SSH.start(env.config.ssh.host, env.config[:ssh][:username], opts.merge( :port => port, - :keys => [env.config.ssh.private_key_path])) do |ssh| + :keys => [env.config.ssh.private_key_path], + :user_known_hosts_file => [], + :paranoid => false, + :config => false)) do |ssh| yield SSH::Session.new(ssh) end end diff --git a/templates/ssh_config.erb b/templates/ssh_config.erb index f5131f467..e7f98d9c8 100644 --- a/templates/ssh_config.erb +++ b/templates/ssh_config.erb @@ -4,4 +4,5 @@ Host <%= host_key %> Port <%= ssh_port %> UserKnownHostsFile /dev/null StrictHostKeyChecking no + PasswordAuthentication no IdentityFile <%= private_key_path %>