title: Running ssh sudo asynchronously
body: <p>I'm trying to run a command with sudo on a remote machine. When I do it directly with </p>
  
  <pre><code>ssh -t -t -t myserver -q "sudo otheruser&lt;&lt;EOF
  remotescript.sh
  EOF"
  </code></pre>
  
  <p>it works fine, but if I add &amp; at the end of the last line then it doesn't work. Why? How can I make it work?</p>
  
  <p>I fact I'm running several such commands (to different servers) from a local script and save each output in a different file and would like them to run <strong>asynchronously</strong>.</p>
  
  <p>Note: running ssh with otheruser@myserver is not an option. I really need to run sudo after I logged in.</p>