Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
> A ssh node problem in the shell
post Nov 16 2011, 01:47 AM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 5
Joined: 16-November 11
Member No.: 15,690

I want to enter the command step by step automatically with a shell

when I run the shell,the program only jump to ssh node1,and do nothing else.
Help and thanks.
Here is the program:

ssh node1
cd /us1
nohup matlab < pi11081.m >& name.out &
cd /us2
nohup matlab < pichuli2.m >& name.out &
ssh node2
cd /us1
nohup matlab < pichuli3.m >& name.out &
cd /us2
nohup matlab < pichuli4.m >& name.out &
ssh node3
cd /us1
nohup matlab < pichuli5.m >& name.out &
cd /us2
nohup matlab < pichuli6.m >& name.out &
Go to the top of the page
+Quote Post
Start new topic
post Nov 16 2011, 07:05 AM
Post #2

Its GNU/

Group: Support Specialist
Posts: 1,806
Joined: 23-January 03
Member No.: 360

Basically when you run ssh it starts another tty so the commands following ssh are never executed.
You can run commands from ssh like

ssh -n -f node1 "sh -c \"cd /us1; nohup matlab <pi11081.m> name.out &\""
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 19th March 2018 - 09:24 PM