I have looked around as I would've thought this would be a rather common question, but nothing seems to be working for me.
Basically I'm trying to SSH into a device (Raspberry Pi) to run a process. The process is
node ./bin/www. I wrote a
publish.sh script that does a few things before this, but when I run the command
ssh user@hostname "cd <my-location>;node ./bin/www it respectively starts the process in my current bash shell.
What I'm looking to do is open up a new bash shell to run that command, as that process will start a web server.
I tried wrapping my
ssh command in
bash -c 'ssh ...' but it still runs in the same shell window that the
publish.sh script was kicked off in. Am I doing something wrong? What exactly do I need to do in my shell script to run a command in a new bash shell process?