mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Merge pull request #372 from tsl0922/patch-1
Set private key for proxy_command
This commit is contained in:
commit
4b7fedbd42
@ -48,8 +48,8 @@ module VagrantPlugins
|
||||
:forward_agent => machine.config.ssh.forward_agent,
|
||||
: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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user