Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Linux / UNIX and the fly likes Calling shell script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Calling shell script " Watch "Calling shell script " New topic

Calling shell script

Rajesh Kandhasamy

Joined: Sep 19, 2005
Posts: 15

I would like to call shell script from one linux box to other linux box

how to call shell script which reside in other linux box,

Thanks in advance,
Rajesh Kandhasamy
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

You can ssh to the other Linux box and run the script there. That's what I normally do. Does this help you?

SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Darrin Cartwright
Ranch Hand

Joined: Dec 27, 2002
Posts: 107
And if you can ssh, you can do it all in one command like:

Exchange ssh keys and you won't have to supply a password, which makes it easy to run from a program.

Life is good on the Ponderosa,<br />but mind where you step.
It is sorta covered in the JavaRanch Style Guide.
subject: Calling shell script
Similar Threads
Loading Properties into WAS on Startup
Get the UNIX process ID of the java program
runtime exec
call java program from script?
JSP Page to call Linux Shell Script