Call one script from other script lying on different servers.

HI All,

I have a requirement of execueting a Shell script on serverA, which is going to execute an application script ( Hyperian Planning script ) on serverB. Can any one please help in how to achieve this?

e.g.

script abc.ksh runs on serverA.

internally abc.ksh call a script def.msh (def.msh resides on serverB).

Appreciate your help.

Thanks

If serverA can ssh into serverB you can, in serverA's script do this:

ssh root@serverB '/path/to/script/def.msh'

you can substitute root with the actual user you have login for and access to the script
if you need a different shell to run your script use that shell's execute flag, with bash it'd be something like

ssh root@serverB "bash -c '/path/to/script/dev.msh'"

Thanks Deimos.

Is ther any alternative to achieve this? I am not sure whether I can use ssh :frowning:

Hi alok,

You could use remote shell or rexec

rsh serverB /path/to/script/def.msh

or

See the post here

Regards

Gull04