title: Python Paramiko SSH run command
body: <p>I want to run simple command just for test ssh connection. There is an error about stdin/out/err. Code and error mesage is below.</p>
  
  <p>Can someone help me ?</p>
  
  <h2>Code</h2>
  
  <pre><code>import paramiko
  import sys
  
  client = paramiko.SSHClient()
  client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  client.connect('x.x.x.x', port=2222, username='user', password='pass')
  stdin, stdout, stderr = client.exec_command('exit')
  
  print stdout
  client.close()
  </code></pre>
  
  <h1>Error message</h1>
  
  <pre><code>Traceback (most recent call last):
  File "C:/Users/EXT03D3912/PycharmProjects/paramiko_ssh1/paramiko_ssh1.py",           line 9, in &lt;module&gt;
  stdin, stdout, stderr = client.exec_command('exit')
  File "build\bdist.win32\egg\paramiko\client.py", line 343, in exec_command
  File "build\bdist.win32\egg\paramiko\channel.py", line 212, in exec_command
  File "build\bdist.win32\egg\paramiko\channel.py", line 1081, in     _wait_for_event
  EOFError
  </code></pre>
  
  <p>thanks,
  haktan</p>