Merge pull request #1537 from wormzer/master

communicator/ssh: Additional proxy_command option
This commit is contained in:
Mitchell Hashimoto 2013-09-04 17:18:59 -07:00
commit 763bdc42f4
3 changed files with 6 additions and 0 deletions

View File

@ -281,6 +281,9 @@ module Vagrant
info[:forward_agent] = @config.ssh.forward_agent
info[:forward_x11] = @config.ssh.forward_x11
# add in provided proxy command config
info[:proxy_command] = @config.ssh.proxy_command if @config.ssh.proxy_command
# Set the private key path. If a specific private key is given in
# the Vagrantfile we set that. Otherwise, we use the default (insecure)
# private key, but only if the provider didn't give us one.

View File

@ -5,6 +5,7 @@ require 'timeout'
require 'log4r'
require 'net/ssh'
require 'net/ssh/proxy/command'
require 'net/scp'
require 'vagrant/util/ansi_escape_code_remover'
@ -208,6 +209,7 @@ module VagrantPlugins
:logger => ssh_logger,
:verbose => :debug
})
connect_opts[:proxy] = Net::SSH::Proxy::Command.new(ssh_info[:proxy_command]) if ssh_info[:proxy_command]
@logger.info("Attempting to connect to SSH...")
@logger.info(" - Host: #{ssh_info[:host]}")

View File

@ -10,6 +10,7 @@ module VagrantPlugins
attr_accessor :guest_port
attr_accessor :keep_alive
attr_accessor :shell
attr_accessor :proxy_command
attr_reader :default