From 083dce5c6129954995e8afa13b04857986b2b0da Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 30 Aug 2014 22:55:13 -0700 Subject: [PATCH] Revert "core: guard against SSH to localhost:22 [GH-4070]" This reverts commit 62561f28448bc848fe4572a1849adea4488b0a17. This broke WinRM. Will fix in a future version. --- CHANGELOG.md | 1 - lib/vagrant/machine.rb | 7 ------- test/unit/vagrant/machine_test.rb | 7 ------- 3 files changed, 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04e7e52c0..a3598191e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,6 @@ IMPROVEMENTS: BUG FIXES: - - core: Guard against SSHing to localhost:22 [GH-4070] - core: Downloading box files should resume in more cases since the temporary file is preserved in more cases. [GH-4301] - core: Windows is not detected as NixOS in some cases. [GH-4302] diff --git a/lib/vagrant/machine.rb b/lib/vagrant/machine.rb index fc1f9929a..9d2c0d15c 100644 --- a/lib/vagrant/machine.rb +++ b/lib/vagrant/machine.rb @@ -434,13 +434,6 @@ module Vagrant File.expand_path(path, @env.root_path) end - # If we're connecting to localhost:22, then short-circuit - # and return nil here since this is something that nobody ever - # really wants. - if info[:host] == "127.0.0.1" && info[:port] == 22 - return nil - end - # Return the final compiled SSH info data info end diff --git a/test/unit/vagrant/machine_test.rb b/test/unit/vagrant/machine_test.rb index 24ac65ae4..d8e55e346 100644 --- a/test/unit/vagrant/machine_test.rb +++ b/test/unit/vagrant/machine_test.rb @@ -605,13 +605,6 @@ describe Vagrant::Machine do expect(instance.ssh_info[:password]).to eql("") end - it "should return nil if localhost:22" do - provider_ssh_info[:host] = "127.0.0.1" - instance.config.ssh.port = 22 - - expect(instance.ssh_info).to be_nil - end - context "with no data dir" do let(:base) { true } let(:data_dir) { nil }