title: Unable to execute tcpdump remotely with Paramiko
body: <p>I'm trying to run tcpdump remotely using <a href="http://www.paramiko.org" rel="nofollow">Paramiko</a>. </p>
  
  <pre><code>    ssh = paramiko.SSHClient()
      ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
      ssh.connect(ip_machine, username='root', password=password)
      my_command = 'sudo timeout 10 tcpdump -i eth0 ip -w somefile'
      stdin, stdout, stderr = ssh.exec_command(my_command)
      channel = stdout.channel
      channel.recv_exit_status()
      ssh.close()
  </code></pre>
  
  <p>The program exits immediately, despite the <code>timeout</code> command and the <code>recv_exit_status</code>. The output file of tcpdump is created, but it is empty. </p>