Module: Dorothy::Ssh

Extended by:
Ssh
Included in:
Ssh
Defined in:
lib/dorothy2/do-utils.rb

Instance Method Summary collapse

Instance Method Details

#download(host, user, pass, file, dest, port = 22) ⇒ Object



127
128
129
130
131
# File 'lib/dorothy2/do-utils.rb', line 127

def download(host, user, pass, file, dest, port=22)
  Net::SSH.start(host, user, :password => pass, :port =>port) do |ssh|
    ssh.scp.download! file, dest
  end
end