title: nohup - dont want nohup.out but want log going to a different file on the remote server
body: <p>I'm running the following command (where variables have valid values for ssh command and $file - is a .sql file).</p>
  
  <pre><code>nohup ssh -qn ${ssh_user}@${dbs} "sqlplus $dbuser/${dbpswd}@${dbname} &lt;&lt;ENDSQL | tee "${sql_run_output_file}".ssh.log
  set echo off
  set echo on
  set timing on
  set time on
  set serveroutput on size 1000000
  @${file}
  ENDSQL
  "
  </code></pre>
  
  <p>When I was using the above command without "nohup" before ssh command, after 1 hour or so, my connection from source server (where im running ssh) was getting an error/message "Connection reset...." and hanging my BASH shell script (which contains this ssh command in it). When, I use nohup, i dont see the connection issue. </p>
  
  <p><br/><br/>Here's what I'm trying to get and need your help.</p>
  
  <ul>
  <li>Change the command shown above so that the command will NOT create a nohup.out
  (Did I read that I can use > instead of | tee ... and use 2>&amp;1)</li>
  <li>I DO NOT want to run the command giving a "&amp;" (background)</li>
  <li>I DO want a LOG file for the sqlplus session that's running on the target DB server via ssh command/connection (initiated from source server).</li>
  </ul>
  
  <p>Thanks.</p>