Skip to content

Commit

Permalink
Support proxy mode for ssh connectivity
Browse files Browse the repository at this point in the history
This is useful when running boxes on a remote hypervisor exposed via ssh
(f.e. libvirt), where connection to the box is proxied through the
hypervisor node.

Closes #75
  • Loading branch information
booxter committed Apr 10, 2017
1 parent ee82c07 commit 313017c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/vagrant-sshfs/cap/guest/linux/sshfs_forward_mount.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ def self.sshfs_slave_mount(machine, opts, hostpath, expanded_guest_path)
ssh_opts+= ' -o "IdentityFile=\"' + machine.ssh_info[:private_key_path][0] + '\""'
ssh_opts+= ' -o UserKnownHostsFile=/dev/null '
ssh_opts+= ' -F /dev/null ' # Don't pick up options from user's config

# Use an SSH ProxyCommand when corresponding Vagrant setting is defined
if machine.ssh_info[:proxy_command]
ssh_opts+= " -o ProxyCommand=\"" + machine.ssh_info[:proxy_command] + "\""
end

ssh_cmd = ssh_path + ssh_opts + ' ' + ssh_opts_append + ' ' + machine.ssh_info[:host]
ssh_cmd+= ' "' + sshfs_cmd + '"'

Expand Down

0 comments on commit 313017c

Please sign in to comment.