Merge pull request #372 from tsl0922/patch-1

Set private key for proxy_command
This commit is contained in:
Dmitry Vasilets 2015-05-17 12:51:37 +02:00
commit 4b7fedbd42
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ module VagrantPlugins
:forward_x11 => machine.config.ssh.forward_x11,
}
ssh_info[:proxy_command] = "ssh '#{machine.provider_config.host}' -l '#{machine.provider_config.username}' nc %h %p" if machine.provider_config.connect_via_ssh
ssh_info[:proxy_command] = "ssh '#{machine.provider_config.host}' -l '#{machine.provider_config.username}' -i '#{machine.provider_config.id_ssh_key_file}' nc %h %p" if machine.provider_config.connect_via_ssh
ssh_info
end

View File

@ -248,7 +248,7 @@ module VagrantPlugins
# set ssh key for access to libvirt host
uri << "\&keyfile="
# if no slash, prepend $HOME/.ssh/
uri << "#{`echo ${HOME}`.chomp}/.ssh/" if @id_ssh_key_file !~ /\A\//
@id_ssh_key_file.prepend("#{`echo ${HOME}`.chomp}/.ssh/") if @id_ssh_key_file !~ /\A\//
uri << @id_ssh_key_file
end
# set path to libvirt socket