I'm trying to start a program in the background on a remote server via ssh, but this program must be run from the directory it is contained within.
I tried doing the following
ssh -q user@server 'cd directory && command > /dev/null 2>&1 &'
But this results in the error
Ambiguous output redirect.
I am redirecting the output to
/dev/null because otherwise the ssh call would not finish.
I have tried wrapping the command in
(), as well as with and without quotes but get the same error.
How can I work around this issue?