If I run a process at the remote site by using ssh as follows:
nohup ssh remote sleep 100 & Is there a way to know the PID of sleep at remote? Trying echo $! just returns the PID of ssh at local. And, greping won't work since there are multiple sleep processes at remote.