From 59fa9ac46be2c26331eebae37a1576b10d224367 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 19 Jan 2011 22:00:38 -0800 Subject: [PATCH] net-ssh 2.1.0. Adds "IdentitiesOnly" support for net-ssh, fixing problems. --- CHANGELOG.md | 2 ++ lib/vagrant/ssh.rb | 1 + test/vagrant/ssh_test.rb | 1 + vagrant.gemspec | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4ed381a0..a9a17c7e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## 0.7.1 (unreleased) - Change error output with references to VirtualBox 3.2 to 4.0. + - Internal SSH through net-ssh now uses `IdentitiesOnly` thanks to + upstream net-ssh fix. ## 0.7.0 (January 19, 2011) diff --git a/lib/vagrant/ssh.rb b/lib/vagrant/ssh.rb index 3d6ba9e26..c300d6b6a 100644 --- a/lib/vagrant/ssh.rb +++ b/lib/vagrant/ssh.rb @@ -70,6 +70,7 @@ module Vagrant Net::SSH.start(env.config.ssh.host, env.config.ssh.username, opts.merge( :keys => [env.config.ssh.private_key_path], + :keys_only => true, :user_known_hosts_file => [], :paranoid => false, :config => false)) do |ssh| diff --git a/test/vagrant/ssh_test.rb b/test/vagrant/ssh_test.rb index 92fbfddd8..759691fbd 100644 --- a/test/vagrant/ssh_test.rb +++ b/test/vagrant/ssh_test.rb @@ -147,6 +147,7 @@ class SshTest < Test::Unit::TestCase assert_equal @env.config.ssh.username, username assert_equal @ssh.port, opts[:port] assert_equal [@env.config.ssh.private_key_path], opts[:keys] + assert opts[:keys_only] true end @ssh.execute diff --git a/vagrant.gemspec b/vagrant.gemspec index 8472d9e2c..82d6c24b8 100644 --- a/vagrant.gemspec +++ b/vagrant.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |s| s.add_dependency "erubis", "~> 2.6.6" s.add_dependency "json", "~> 1.4.6" s.add_dependency "mario", "~> 0.0.6" - s.add_dependency "net-ssh", "~> 2.0.23" + s.add_dependency "net-ssh", "~> 2.1.0" s.add_dependency "net-scp", "~> 1.0.4" s.add_dependency "i18n", "~> 0.5.0" s.add_dependency "thor", "~> 0.14.6"