title: How to open ssh and launch a command at the same time?
body: <p>I have an application (Java, but could be anything else) which needs to launch another application. This is not on the same machine.</p>
  
  <p>Manually, I would launch the application in this way:</p>
  
  <pre><code>ssh myself@machine -X
  /..../myapplication
  </code></pre>
  
  <p>I tried to put the two commands in a text file called <code>mycommand</code> and</p>
  
  <pre><code>source mycommand
  </code></pre>
  
  <p>...but the second command will be executed on the local machine just after having closed the SSH section.</p>
  
  <p>Do you know if there is a way to open an ssh and launch an application from the other machine at the same time without the user intervention?</p>