title: can't see nohup command's output when used with ssh
body: <p>I am trying to run a jar onto a different server. So, in my current script I do ssh on that server, and then run the jar using nohup. But, nohup.out is not getting created on the new server. So, I am not able to catch errors. </p>
  
  <p>If, I log into that server manually and then fire the jar, nohup.out gets created. Can someone please help with this?</p>
  
  <p>Below is the command that I've written in my script:</p>
  
  <pre><code>sshpass -p $node_pwd ssh -n root@$node "sh -c 'cd mydir;nohup java -jar NodeStarter.jar config.properties &gt; /dev/null 2&gt;&amp;1 &amp;'"
  </code></pre>
  
  <p>Here, <strong>node</strong> is the server I am logging into.
  <strong>node_pwd</strong> is the variable containing the password for that server.</p>