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

@ -48,8 +48,8 @@ module VagrantPlugins
:forward_agent => machine.config.ssh.forward_agent, :forward_agent => machine.config.ssh.forward_agent,
:forward_x11 => machine.config.ssh.forward_x11, :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 ssh_info
end end

View File

@ -248,7 +248,7 @@ module VagrantPlugins
# set ssh key for access to libvirt host # set ssh key for access to libvirt host
uri << "\&keyfile=" uri << "\&keyfile="
# if no slash, prepend $HOME/.ssh/ # 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 uri << @id_ssh_key_file
end end
# set path to libvirt socket # set path to libvirt socket