I'm trying to execute a script on a remote server via ssh.
the command should go to the background and continue to run after logout. The result of the command should be redireced to out.log on the remote site.
the ssh process should exit without waiting for the command
The remote shell is csh
I tried various versions (quoting, braces...) of the following line
ssh target.host "nohup csh longrunning.sh > out.log 2>&1 &; exit"
Either my attempts don't do anything on the remote site or I get ambiguous redirect, because of the multiple ampersands.
The remote site is a minimal FreeBSD system, with no tools like