title: Paramiko: Why is reading so slow?
body: <p>Why does this script</p>
  
  <pre><code>ssh = paramiko.SSHClient()
  ssh.load_system_host_keys()
  ssh.connect('remote.machine')
  stdin, stdout, stderr = ssh.exec_command('cat 200mb.file')
  stdin.close()
  while not stdout.channel.exit_status_ready():
      while stdout.channel.recv_ready():
      #if stdout.channel.recv_ready():
          buf = stdout.channel.recv(4096)
  </code></pre>
  
  <p>needs a few minutes while</p>
  
  <pre><code># ssh remote.machine 'cat 200mb.file' &gt; 200mb.file
  </code></pre>
  
  <p>needs less than two seconds? (Yes I know that I will loose some output at the end due to paramikos SSH-behaviour.)</p>
  
  <p>Any suggestions or recommendations would be appreciated.</p>