diff --git a/lib/uri/open-scp.rb b/lib/uri/open-scp.rb index 086fbe7..9fa4c4a 100644 --- a/lib/uri/open-scp.rb +++ b/lib/uri/open-scp.rb @@ -8,7 +8,10 @@ module URI class SCP def buffer_open(buf, proxy, open_options) - options = open_options.merge(:port => port, :password => password) + options = open_options.dup + options[:ssh] = { :port => port } + options[:ssh][:password] = password if password + options[:ssh].merge!(open_options[:ssh] || {}) progress = options.delete(:progress_proc) buf << Net::SCP.download!(host, user, path, nil, options, &progress) buf.io.rewind