lib/vagrant/scp/commands/scp.rb in vagrant-scp-0.5.6 vs lib/vagrant/scp/commands/scp.rb in vagrant-scp-0.5.7

- old
+ new

@@ -22,15 +22,23 @@ source = "'#{source_files}'" else target = "'#{target_files}'" source = "#{user_at_host}:'#{source_files}'" end + + if @ssh_info[:proxy_command] + proxy_command = "-o ProxyCommand='#{@ssh_info[:proxy_command]}'" + else + proxy_command = '' + end + command = [ "scp", "-r", "-o StrictHostKeyChecking=no", "-o UserKnownHostsFile=/dev/null", "-o port=#{@ssh_info[:port]}", + proxy_command, "-i '#{@ssh_info[:private_key_path][0]}'", source, target ].join(' ') system(command)