Disable IdentitiesOnly for SunSSH

SunSSH is default on Solaris/OpenSolaris/Illumos. SunSSH does not support
the IdentitiesOnly option. 'vagrant ssh' works when the options is not supplied.
This commit is contained in:
Hendrik Volkmer 2012-03-18 16:32:15 +01:00
parent cd92d6483f
commit 28e391cb61
2 changed files with 6 additions and 3 deletions

View File

@ -76,8 +76,11 @@ module Vagrant
# Command line options
command_options = ["-p", options[:port].to_s, "-o", "UserKnownHostsFile=/dev/null",
"-o", "StrictHostKeyChecking=no", "-o", "IdentitiesOnly=yes",
"-o", "LogLevel=ERROR"]
"-o", "StrictHostKeyChecking=no", "-o", "LogLevel=ERROR"]
# Solaris/OpenSolaris/Illumos uses SunSSH which doesn't support the IdentitiesOnly option
command_options += ["-o", "IdentitiesOnly=yes"] unless Util::Platform.solaris?
command_options += ["-i", options[:private_key_path]] if !plain_mode
command_options += ["-o", "ForwardAgent=yes"] if ssh_info[:forward_agent]

View File

@ -14,7 +14,7 @@ module Vagrant
platform.include?("darwin9")
end
[:darwin, :bsd, :freebsd, :linux].each do |type|
[:darwin, :bsd, :freebsd, :linux, :solaris].each do |type|
define_method("#{type}?") do
platform.include?(type.to_s)
end