diff --git a/config/default.rb b/config/default.rb index cd87aa98b..94f983ff2 100644 --- a/config/default.rb +++ b/config/default.rb @@ -9,7 +9,7 @@ Vagrant::Config.run do |config| config.ssh.forwarded_port_key = "ssh" config.ssh.forwarded_port_destination = 22 config.ssh.max_tries = 100 - config.ssh.timeout = 7 + config.ssh.timeout = 10 config.ssh.forward_agent = false config.ssh.forward_x11 = false diff --git a/lib/vagrant/ssh.rb b/lib/vagrant/ssh.rb index fb32e3708..4074f0398 100644 --- a/lib/vagrant/ssh.rb +++ b/lib/vagrant/ssh.rb @@ -75,8 +75,6 @@ module Vagrant # Connect to SSH and gather the session session = retryable(:tries => @vm.config.ssh.max_tries, :on => exceptions) do - sleep 4 # Hacky but helps with issue #391, #455, etc. - connection = Net::SSH.start(@vm.config.ssh.host, @vm.config.ssh.username, opts.merge( :keys => [private_key_path], @@ -86,6 +84,7 @@ module Vagrant :config => false)) sleep 4 # Hacky but helps with issue #391, #455, etc. + SSH::Session.new(connection, @vm) end