only use controlmaster for non-windows platforms, resolves #6702

This commit is contained in:
Andrew Coleman 2016-02-10 22:14:27 -05:00
parent ca728df02b
commit 95ab29b3db
1 changed files with 6 additions and 4 deletions

View File

@ -69,14 +69,16 @@ module VagrantPlugins
# Create the path for the control sockets. We used to do this # Create the path for the control sockets. We used to do this
# in the machine data dir but this can result in paths that are # in the machine data dir but this can result in paths that are
# too long for unix domain sockets. # too long for unix domain sockets.
controlpath = File.join(Dir.tmpdir, "ssh.#{rand(1000)}") control_options = ""
unless Vagrant::Util::Platform.windows?
controlpath = File.join(Dir.tmpdir, "ssh.#{rand(1000)}")
control_options = "-o ControlMaster=auto -o ControlPath=#{controlpath} -o ControlPersist=10m"
end
rsh = [ rsh = [
"ssh -p #{ssh_info[:port]} " + "ssh -p #{ssh_info[:port]} " +
proxy_command + proxy_command +
"-o ControlMaster=auto " + control_options +
"-o ControlPath=#{controlpath} " +
"-o ControlPersist=10m " +
"-o StrictHostKeyChecking=no " + "-o StrictHostKeyChecking=no " +
"-o IdentitiesOnly=true " + "-o IdentitiesOnly=true " +
"-o UserKnownHostsFile=/dev/null", "-o UserKnownHostsFile=/dev/null",