From 0500f2b9b35d300895d8a45990e3908e0c8910d3 Mon Sep 17 00:00:00 2001 From: Gavin Williams Date: Thu, 27 Sep 2018 16:16:03 +0100 Subject: [PATCH] Add support for SSH config file to Rsync helper --- plugins/synced_folders/rsync/helper.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/synced_folders/rsync/helper.rb b/plugins/synced_folders/rsync/helper.rb index c190cf3c1..5604b83cf 100644 --- a/plugins/synced_folders/rsync/helper.rb +++ b/plugins/synced_folders/rsync/helper.rb @@ -77,6 +77,11 @@ module VagrantPlugins proxy_command = "-o ProxyCommand='#{ssh_info[:proxy_command]}' " end + ssh_config_file = "" + if ssh_info[:config] + ssh_config_file = "-F #{ssh_info[:config]}" + end + # Create the path for the control sockets. We used to do this # in the machine data dir but this can result in paths that are # too long for unix domain sockets. @@ -91,6 +96,7 @@ module VagrantPlugins "ssh", "-p", "#{ssh_info[:port]}", "-o", "LogLevel=#{log_level}", proxy_command, + ssh_config_file, control_options, ]