Originally Posted by colucix
That's correct. The first ssh statement does only a login to node1 and then sticks waiting for user input at the prompt of node1 itself. Instead if you want to pass some command to be executed on node1 you need to specify them as standard input and don't forget the exit command to terminate the ssh session. For multiple commands you can try a here document
ssh node1 << EOF
nohup matlab < pi11081.m >& name.out &
nohup matlab < pichuli2.m >& name.out &
ssh node2 << EOF
nohup matlab < pichuli3.m >& name.out &
nohup matlab < pichuli4.m >& name.out &
ssh node3 << EOF
nohup matlab < pichuli5.m >& name.out &
nohup matlab < pichuli6.m >& name.out &
Hope this helps.
Thanks! You are great.it's helpful.
When I posted this, I continued searching some solutions and find "rsh" can do my thing. But I only can execute only one command and maybe I will learn it. Last of all, thanks