title: paramiko.SSHException: Channel closed
body: <p>I try to use python 2.7.1 and paramiko 1.12.0:</p>
  
  <pre><code>connection = paramiko.SSHClient()
  connection.load_host_keys(os.path.expanduser(os.path.join("~", ".ssh", "known_hosts")))
  connection.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  
  connection.connect(hostIP, 22, 'd', 'd')
  
  command = 'ls'
  (stdin, stdout, stderr) = connection.exec_command(command)
  response = stdout.readlines()
  errormsg = stderr.read()
  </code></pre>
  
  <p>But I get this error message:</p>
  
  <pre><code>Traceback (most recent call last):&lt;br&gt;
    File "./ssh.py", line 32, in &lt;module&gt;&lt;br&gt;
      (stdin, stdout, stderr) = connection.exec_command(command)&lt;br&gt;
    File "/app/python/2.7.1/LMWP3/lib/python2.7/site-packages/paramiko/client.py", line 379, in exec_command&lt;br&gt;
      chan.exec_command(command)&lt;br&gt;
    File "/app/python/2.7.1/LMWP3/lib/python2.7/site-packages/paramiko/channel.py", line 218, in exec_command&lt;br&gt;
      self._wait_for_event()&lt;br&gt;
    File "/app/python/2.7.1/LMWP3/lib/python2.7/site-packages/paramiko/channel.py", line 1129, in _wait_for_event&lt;br&gt;
      raise e&lt;br&gt;
  paramiko.SSHException: Channel closed.
  </code></pre>