Main Content


Execute mjs command on one or more remote hosts by transport protocol


remotemjs <mjs options> <flags> <protocol options>


remotemjs <mjs options> <flags> <protocol options> allows you to execute the mjs service on one or more remote hosts.

For a description of the mjs service, see the mjs reference page.

The following table describes the supported flags and options. You can combined multiple flags in the same command, preceding each flag by a dash (-).

Flags and OptionsOperation
<mjs options>Options and arguments of the mjs command, such as start, stop, etc. See the mjs reference page for a full list.
-matlabroot <installfoldername>The MATLAB installation folder on the remote hosts, required only if the remote installation folder differs from the one on the local machine.
-remotehost host1[,host2[,...]The names of the hosts where you want to run the mjs command. Separate the host names by commas without any white spaces. This is a mandatory argument.
-remoteplatform { unix | windows } The platform of the remote hosts. This option is required only if different from the local platform.
-quietPrevent mjs from prompting the user for missing information. The command fails if all required information is not specified.
-helpPrint help information.
-protocol <type>

Force the usage of a particular protocol type. Specifying a protocol type with all its required parameters also avoids interactive prompting and allows for use in scripts.

The supported protocol types are ssh and winsc.

To get more information about one particular protocol type, enter

remotemjs -protocol <type> -help

For example:

remotemjs -protocol winsc -help

Using the winsc protocol requires that you log in as a user with admin privileges on the remote host.

<protocol options>Specify particular options for the protocol type being used.


If you are using OpenSSHd on a Microsoft® Windows® operating system, you can encounter a problem when using backslashes in path names for your command options. In most cases, you can work around this problem by using forward slashes instead. For example, to specify the file C:\temp\mjs_def.bat, you should identify it as C:/temp/mjs_def.bat.


Start mjs on three remote machines of the same platform as the client:

remotemjs start -remotehost hostA,hostB,hostC

Start mjs in a clean state on two UNIX operating system machines from a Windows operating system machine, using the ssh protocol. Enter the following command on a single line:

remotemjs start -clean -matlabroot /usr/local/matlab
 -remotehost unixHost1,unixHost2 -remoteplatform UNIX
 -protocol ssh

Compatibility Considerations

expand all

Warns starting in R2018b

See Also