title: How to interact with ssh using subprocess module
body: <p>I'm trying to spawn an ssh child process using subprocess.</p>
  
  <p>I'm working on Python 2.7.6 on Windows 7</p>
  
  <p>here is my code:</p>
  
  <pre><code>from subprocess import *
  r=Popen("ssh sshserver@localhost", stdout=PIPE)
  stdout, stderr=r.communicate()
  print(stdout)
  print(stderr)
  </code></pre>
  
  <p>The outputs:</p>
  
  <pre><code>None
  </code></pre>
  
  <p>stdout should contain:
      sshserver@localhost's password:</p>