Skip to content

Commit

Permalink
Disable IdentitiesOnly for SunSSH
Browse files Browse the repository at this point in the history
SunSSH is default on Solaris/OpenSolaris/Illumos. SunSSH does not support
the IdentitiesOnly option. 'vagrant ssh' works when the options is not supplied.
  • Loading branch information
hvolkmer committed Mar 18, 2012
1 parent cd92d64 commit 28e391c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lib/vagrant/ssh.rb
Expand Up @@ -76,8 +76,11 @@ def exec(opts={})

# 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]

Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant/util/platform.rb
Expand Up @@ -14,7 +14,7 @@ def leopard?
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
Expand Down

0 comments on commit 28e391c

Please sign in to comment.