enable IdentitiesOnly when config.ssh.keys_only is specified.

This commit is contained in:
Benjamin Ash
2018-01-18 10:52:01 -05:00
parent 6fdbf4b818
commit 7812ad2be5

View File

@@ -95,6 +95,7 @@ module VagrantPlugins
StrictHostKeyChecking=no
PasswordAuthentication=no
ForwardX11=#{ssh_info[:forward_x11] ? 'yes' : 'no'}
IdentitiesOnly=#{ssh_info[:keys_only] ? 'yes' : 'no'}
) + ssh_info[:private_key_path].map do |pk|
"IdentityFile='\"#{pk}\"'"
end).map { |s| s.prepend('-o ') }.join(' ')