title: Batch script to launch MobaXterm with several tabs
body: <p>I'm pretty new to batch so I'd appreciate the help.</p>
  
  <p>The goal is to launch MobaXterm with X SSH sessions, all on the same window (different tabs).</p>
  
  <p>This is the relevant part from the code:</p>
  
  <pre><code>set n=0
  for %%a in (%name%) do (
      set n+=1
      set "name[!n!]=%%~a"
      start MobaXterm_Professional_9.1.exe -newtab -exec "waitforX; ssh -i %key% %user%@%%~a"
      ECHO name is %%~a
      timeout /t 5
  )
  </code></pre>
  
  <p>With this I am able to open the first ssh session but for the rest of the sessions I get an error in each session saying "<strong>/bin/bash: -c: option requires an argument</strong>"<br>
  If I remove "start" and "timeout" only the first session is opened because the ssh doesn't run in the background.</p>