class Net::SCP
def self.upload!(host, username, local, remote, options={}, &progress)
to the #upload! method. If a block is given, it will be used to report
options (e.g., to set the password, etc.). All other options are passed
:ssh key, the value for that will be passed to the SSH connection as
upload from +local+ to +remote+. If the +options+ hash includes an
instantiates a new SCP session on top of it, and then begins an
Starts up a new SSH connection using the +host+ and +username+ parameters,
def self.upload!(host, username, local, remote, options={}, &progress) options = options.dup start(host, username, options.delete(:ssh) || {}) do |scp| scp.upload!(local, remote, options, &progress) end end