title: How do I transfer multiple files using Ruby Net::SSH.start?
body: <p>I want to copy all files from remote host <code>/root/files/*.log</code>to my current directory - <code>./files1/</code></p>
  
  <pre><code>require 'rubygems'
  require 'net/ssh'
  require 'net/scp'
  
  Net::SSH.start( scp_hostname, scp_username, :keys =&gt; scp_keys, :timeout =&gt; 360 ) do |ssh|
      ssh.scp.download!( '/root/files/*.log', './files1/' )
      ssh.exec!( .. )
      ssh.exec!( .. )
  end
  </code></pre>
  
  <p>I got an exception :</p>
  
  <pre><code>caught exception SCP did not finish successfully (1): scp: /root/files/*.log: No such file or directory
  </code></pre>
  
  <p>But it worked when I copied a specific file </p>
  
  <pre><code>ssh.scp.download!( '/root/files/myfile.log', './files1/' )
  </code></pre>
  
  <p>Can anyone help?</p>
  
  <p>Thanks!</p>