diff --git a/CHANGELOG.md b/CHANGELOG.md index b9b957af8..a751e3e8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ logging is silent. - Linux uses `shutdown -h` instead of `halt` to hopefully more consistently power off the system. [GH-575] + - Tweaks to SSH to hopefully be more reliable in coming up. ## 0.8.8 (December 1, 2011) diff --git a/lib/vagrant/ssh.rb b/lib/vagrant/ssh.rb index fea33ad5d..42d4f27aa 100644 --- a/lib/vagrant/ssh.rb +++ b/lib/vagrant/ssh.rb @@ -74,6 +74,8 @@ 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], @@ -81,6 +83,8 @@ module Vagrant :user_known_hosts_file => [], :paranoid => false, :config => false)) + + sleep 4 # Hacky but helps with issue #391, #455, etc. SSH::Session.new(connection, @vm) end