title: paramiko exec_command redirect to a file
body: <p>I want to capture the screenshot of a remote computer using paramiko. I am using the following code for that</p>
  
  <pre><code>import paramiko
  ssh = paramiko.SSHClient()
  ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  ssh.connect('10.93.80.63', username='root', password='bohica')
  ssh.exec_command("xwd -display :0 -silent -root &gt; myscreen.xwd")
  ssh.close()
  </code></pre>
  
  <p>The issue is that the file myscreen.xwd is created but the size is 0. Could you please let me know how I can capture the screenshot.</p>