Forward agent and forward X11 properly appear in `ssh_config` output. [closes GH-105]

This commit is contained in:
Mitchell Hashimoto 2011-07-06 00:36:05 -07:00
parent 29688eb788
commit c2bccdc65a
4 changed files with 13 additions and 1 deletions

View File

@ -12,6 +12,8 @@
- `ssh_config` host name will use VM name if given. [GH-332]
- `ssh` `-e` flag changed to `-c` to align with `ssh` standard
behavior. [GH-323]
- Forward agent and forward X11 settings properly appear in
`ssh_config` output. [GH-105]
## 0.7.6 (July 2, 2011)

View File

@ -18,7 +18,9 @@ module Vagrant
:ssh_host => vm.env.config.ssh.host,
:ssh_user => vm.env.config.ssh.username,
:ssh_port => vm.ssh.port,
:private_key_path => vm.env.config.ssh.private_key_path
:private_key_path => vm.env.config.ssh.private_key_path,
:forward_agent => vm.env.config.ssh.forward_agent,
:forward_x11 => vm.env.config.ssh.forward_x11
}))
end
end

View File

@ -17,6 +17,8 @@ module Vagrant
def initialize
@sudo_shell = "bash"
@port = nil
@forward_agent = false
@forward_x11 = false
end
def private_key_path

View File

@ -7,3 +7,9 @@ Host <%= host_key %>
PasswordAuthentication no
IdentityFile <%= private_key_path %>
IdentitiesOnly yes
<% if forward_agent -%>
ForwardAgent yes
<% end -%>
<% if forward_x11 -%>
ForwardX11 yes
<% end -%>