amod
amod

Reputation: 4262

How to execute a script on a remote machine?

I would like to know how i can execute a script remotly(on another machine). I dont know what kind of platform that gonna be. So Please also suggest me what kind of scripts i should prefer.

Upvotes: 1

Views: 1129

Answers (2)

salva
salva

Reputation: 10234

There are so many ways... for instance:

$ ssh user@host /bin/sh </local/path/to/script

Upvotes: 0

DaveFar
DaveFar

Reputation: 7447

Do you want to script or use Java?

You can, for instance, use shell scripts and execute other shell scripts remotely via ssh. You can also execute Java code out of the shell scripts.

On Linux, FreeBSD and MacOS, you have good shells and ssh pre-installed. On Windows, you can for instance use Cygwin to get them.

Upvotes: 2

Related Questions