title: Fabric - how to use an interactive shell on remote computer?
body: <p>I am trying to use Fabric to run commands on a remote machine.</p>
  
  <p>This works fine, until the command on the remote machine is interactive. In that case, Fabric return the interactive shell, but force me to type the info needed, while I am trying to send a command that does everything in remote, so I can automate the procedure.</p>
  
  <p>Example:</p>
  
  <pre><code>from fabric.api import *
  env.hosts=['myhost.mydomain']
  env.user='root'
  run(test1/myapp; exectask; exit)
  </code></pre>
  
  <p>I run a cli application on a remote machine, that uses interactive shell, so it is waiting for me to type the command (exectask); then once done, to exit, I call the exit command.</p>
  
  <p>What happens now is that the app launch, Fabric show me the interactive UI and I still need to type exectask and after, exit.</p>
  
  <p>How can I tell fabric to run that app, then pass the command to the interactive shell and then the exit to quit?</p>
  
  <p>I see that Fabric has the prompt feature, but that's to ask the user to input data, while I want to just pass the commands and get the result back.</p>