From ad03163eff55b2ba708341d50df0c3f6330825ee Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 11 Dec 2011 16:41:51 -0800 Subject: [PATCH] Tweak timeouts so SSh detection works --- config/default.rb | 2 +- lib/vagrant/ssh.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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