Los Angeles1
asked on
Linux, remote scripts with ssh (spawn a new script)
I got my remote script to work. I appreciate everyone's help
I am using a putty app from Windows, and then I can use ssh to remotely start a script
and the output from the client program prints out on my putty screen and waits to print more messages (no keyboard is accepted, just print statements.
I am using this command to start the process
sshpass -p 'xxxx' ssh root@xxclnt2 /home/test
This is working successfully as I get something like:
I have a new issue
I want to do now is to run 10 of these ssh remote scripts from the same file
I do NOT want the out put to print on my screen. I simply want it to run in the background without actually printing to a screen or device. So I tried this
sshpass -p 'xxxx' ssh root@xxclnt2 /home/test > nul
sshpass -p 'xxxx' ssh root@xxclnt32 /home/test > nul
However, the script never actually gets to the second line, since it is busy trying to perform the first one by putting the output of the command into nul
Is there any way to 'spawn' a command like this, so I can put multple lines such as this into a script
Thanks
I am using a putty app from Windows, and then I can use ssh to remotely start a script
and the output from the client program prints out on my putty screen and waits to print more messages (no keyboard is accepted, just print statements.
I am using this command to start the process
sshpass -p 'xxxx' ssh root@xxclnt2 /home/test
This is working successfully as I get something like:
sshpass -p 'xxxx' ssh root@xxclnt2 /home/test
output line 1
output line 2
output line 3
...
I have a new issue
I want to do now is to run 10 of these ssh remote scripts from the same file
I do NOT want the out put to print on my screen. I simply want it to run in the background without actually printing to a screen or device. So I tried this
sshpass -p 'xxxx' ssh root@xxclnt2 /home/test > nul
sshpass -p 'xxxx' ssh root@xxclnt32 /home/test > nul
However, the script never actually gets to the second line, since it is busy trying to perform the first one by putting the output of the command into nul
Is there any way to 'spawn' a command like this, so I can put multple lines such as this into a script
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window