title: Keep process running on remote machine after exiting ssh session inside bash script
body: <p>I have a bash script in which I login to a remote machine over ssh and run iperf and then logout and do other things locally. I want iperf to keep running after the bash script logs out. I have tried nohup, disown and setsid, but they don't seem to work when I use them inside the bash script. I have also tried running iperf inside another script, that didn't work either.</p>
  
  <p>Here's the part of the script with nohup example:</p>
  
  <pre><code>ssh root@10.101.10.35 &amp;&gt;/dev/null &amp; &lt;&lt; EOF
  nohup iperf -s -B 192.168.99.1 &amp;&gt;/dev/null &amp;
  EOF
  </code></pre>