title: Error when opening interactive ssh shell from python
body: <p>I am trying to open an interactive ssh shell through fabric.</p>
  
  <p>Requirements:</p>
  
  <ul>
  <li>Use fabrics hosts in the connection string to remote</li>
  <li>Open fully interactive shell in current terminal</li>
  <li>Works on osx and ubuntu</li>
  <li>No need for data transfer between fabric/python and remote. So fabric task can end in background.</li>
  </ul>
  
  <p>So far:</p>
  
  <p>fabfile.py:</p>
  
  <pre><code>def test_ssh():
      from subprocess import Popen
      Popen('ssh user@1.2.3.4 -i "bla.pem"', shell=True)
  </code></pre>
  
  <p>In terminal:</p>
  
  <pre><code>localprompt$ fab test_ssh
  localprompt$ tcsetattr: Input/output error
  
  [remote ubuntu welcome here]
  
  remoteprompt$ |
  </code></pre>
  
  <p>Then if I try to input a command on the remote prompt it is executed locally and I drop back to the local prompt.
  Does anyone know a solution?</p>
  
  <p>Note: I am aware of fabrics <code>open_shell</code>, but this does not work for me since the stdout lags behind, rendering this unusable.</p>