createSharedSecret
R2026bCreate shared secret for encrypted communication
When you set USE_SECURE_COMMUNICATION to
true in the mjs_def file or run MATLAB® Job Scheduler at security level 3, communication between the MATLAB client, job managers, and workers is encrypted. Encrypted communication
requires a shared secret on each participating node (excluding the MATLAB client). The createSharedSecret script creates a file that
serves as the shared secret between the services.
The
createSharedSecret executable resides in the folder
(Windows® operating system) or matlabroot\toolbox\parallel\bin
(Linux® operating system). Enter the command at a Windows or Linux command-line prompt, respectively.matlabroot/toolbox/parallel/bin
Create the secret file only once per cluster on one node, then copy it into the location
specified by SHARED_SECRET_FILE in the mjs_def file on
each node before starting any job managers or workers. In a shared file system, all nodes
can point to the same file. You can reuse shared secrets in subsequent sessions.
Syntax
createSharedSecret
createSharedSecret --file <filename>
Description
createSharedSecret creates a shared secret file used for encrypted
communication between job managers and workers. The file is named secret
in the current folder.
createSharedSecret --file <filename> creates a shared secret
file as the given filename.
Before R2026b: To specify the file option,
use a single dash (-).
Examples
Create a shared secret file in a central location for all the nodes of the cluster:
cd matlabInstallDir/toolbox/parallel/bin
createSharedSecret --file /share/secretThen make sure that the nodes' shared or copied mjs_def files set the
parameter SHARED_SECRET_FILE to /share/secret before
starting the mjs service on each.