I have two gcp linux VMs, with that I am doing ssh from one instance to another and running process using below command, that works fine when command #1 is executed but when I use option to run process in background command #2, the command shows no results.
The gcloud ssh command worked fine for me, and I was able to ping Google in the background using the command below by following this Linux related stackoverflow thread.
gcloud compute ssh --zone=us-east1-c test --command="nohup ping -i 5 google.com > foo.out 2> foo.err < /dev/null &"Since the question is more related to using Linux processes in the background, and for further help, I suggest posting your question at this Stackexchange site.