From 7812ad2be52b18a5141ddd5575bd9f29fbafc3dc Mon Sep 17 00:00:00 2001 From: Benjamin Ash Date: Thu, 18 Jan 2018 10:52:01 -0500 Subject: [PATCH] enable IdentitiesOnly when config.ssh.keys_only is specified. --- lib/vagrant-libvirt/action/forward_ports.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/vagrant-libvirt/action/forward_ports.rb b/lib/vagrant-libvirt/action/forward_ports.rb index 3e8b8c6..944f71a 100644 --- a/lib/vagrant-libvirt/action/forward_ports.rb +++ b/lib/vagrant-libvirt/action/forward_ports.rb @@ -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(' ')