I am running ssh somehost \"service XXX restart\" and the shell hangs.
ssh somehost \"service XXX restart\"
The service is nodeJS and I see express is listening on port ... pr
express is listening on port ...
Using ssh -t does not hang, but it terminates the remote process too.
ssh -t
What works for me is just to run the remote process in background as shown below:
ssh somehost /path/to/some/script augment1 augment2 &