RemoteKernelObject
✖
RemoteKernelObject
specifies a remote kernel that can be used for RemoteEvaluate or LaunchKernels.
Details




- RemoteKernelObject["spec",options …] can be used to override default settings for a kernel specification.
- The following remote kernel specifications are recognized:
-
"ssh://user@hostname:port/path" a kernel on the given machine, accessed using SSH "ssh://hostname" use the default path, user and port on the given machine "hostname" equivalent to "ssh://hostname" "wstp://server:port/pool" a kernel on a WSTPServer "wstp://server" use the default port and kernel pool "localhost" a kernel on the same machine "file:///path/to/wolfram" the given kernel on the same machine "https://www.wolframcloud.com/" a kernel in the Wolfram Cloud - Settings for SSH kernels include:
-
"ForwardPort" Random remote port to use for connection forwarding "KernelArguments" (OS-dependent) arguments to pass the kernel program "KernelCommand" (OS-dependent) the kernel program to run "KernelCount" 1 number of parallel kernels to launch "MachineName" None the name of the machine to connect to "Method" (OS-dependent) how to connect to the kernel on the remote machine "Name" Automatic A unique name for this kernel "OperatingSystem" "Unix" the remote operating system "Port" None the port of the SSH server "SSHArguments" (see below) arguments to pass to the SSH command "SSHCommand" "ssh" the name of the SSH command "SSHIdentity" None the private SSH key to use "SubKernelArguments" {-subkernel,-pacletreadonly} additional arguments for parallel subkernels "TimeConstraint" 10 number of seconds to wait for a connection "Username" None the login name that SSH should use - The connection method "Launch" is the default on macOS and Linux. It uses LinkLaunch to invoke SSH and uses stdin/stdout for the WSTP connection to the remote kernel.
- The connection method "Forward" is the default on Windows. It creates a listening WSTP socket on the local machine and forwards the kernel connection inside an SSH tunnel from the remote kernel to the listening socket.
- The default remote "KernelCommand" is chosen based on the declared "OperatingSytem":
-
"Unix" "wolfram" "MacOSX" "/Applications/Mathematica.app/Contents/MacOS/wolfram" "Windows" "wolfram.exe" - If the given command is not on the search path on the remote machine, the absolute path to the remote kernel command should be given as value of "KernelCommand".
- If "Username" is not set or is None, no username part is given on the SSH command line. "Username"$Username sets the remote username to be the same as the local one.
- "Username" and "KernelCommand" can also be given as part of the specification as "ssh://user@hostname:port/path".
- The default "SSHArguments" are -4 -x -o StrictHostKeyChecking=no -o BatchMode=yes.
- SSH cannot ask for passwords interactively. Keys can be specified, or an SSH password agent can be used.
- Settings for WSTPServer kernels include:
-
"KernelCount" 1 number of parallel kernels to launch "MachineName" None the name of the server to connect to "Name" Automatic A unique name for this kernel "Pool" Automatic the kernel pool to request "Port" 31415 the port to connect to "TimeConstraint" 10 number of seconds to wait for a connection - If the kernel pool is not specified, the WSTPServer chooses a kernel from the default pool.
- Settings for Cloud kernels include:
-
"CloudBase" None the cloud base "Name" Automatic A unique name for this kernel "TimeConstraint" ∞ number of seconds to wait for a connection - The cloud base is given in the form of an https URL.
- Settings for local kernels include:
-
"KernelArguments" (OS-dependent) arguments to pass to the kernel program "KernelCommand" (OS-dependent) the kernel program to launch "KernelCount" UpTo[$ProcessorCount] number of parallel kernels to launch "LowerPriority" True whether to run parallel subkernels at a lower priority "TimeConstraint" ∞ number of seconds to wait for a connection
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Connect to a machine with SSH, launch a default kernel and evaluate some of its properties:

https://wolfram.com/xid/01y7o6v2m4i-tw9cgt

Optionally wrap the kernel specification in RemoteKernelObject:

https://wolfram.com/xid/01y7o6v2m4i-y5aq9g

Specify an absolute path to the remote kernel command:

https://wolfram.com/xid/01y7o6v2m4i-9c9a3y

Alternatively, give the path as an option of RemoteKernelObject:

https://wolfram.com/xid/01y7o6v2m4i-lns2z1

Scope (17)Survey of the scope of standard use cases
SSH Kernels (6)
Give the path to the remote kernel as an option of RemoteKernelObject:

https://wolfram.com/xid/01y7o6v2m4i-twcj2y

Alternatively, specify the path as part of the SSH string:

https://wolfram.com/xid/01y7o6v2m4i-7afkbf

Specify an absolute path to the default kernel command on macOS:

https://wolfram.com/xid/01y7o6v2m4i-tbqmnh

Specify the remote operating system to choose a suitable kernel command:

https://wolfram.com/xid/01y7o6v2m4i-bxj24s

If no options are needed, RemoteKernelObject can be omitted:

https://wolfram.com/xid/01y7o6v2m4i-49dyud

The number of parallel kernels to launch can be given with "KernelCount":

https://wolfram.com/xid/01y7o6v2m4i-08qw4r

When using a URL short form, the number of parallel kernels can be specified with "?n":

https://wolfram.com/xid/01y7o6v2m4i-0ejzzs

WSTPServer Kernels (4)
Connect to a WSTPServer listening on the given port:

https://wolfram.com/xid/01y7o6v2m4i-71kb4a

Alternatively specify the port as an option of RemoteKernelObject:

https://wolfram.com/xid/01y7o6v2m4i-op87sx

Connect to a WSTPServer and request a kernel in the given pool:

https://wolfram.com/xid/01y7o6v2m4i-3lcpmt

Alternatively specify the kernel pool as an option of RemoteKernelObject:

https://wolfram.com/xid/01y7o6v2m4i-61kads

The number of parallel kernels to launch can be given with "KernelCount":

https://wolfram.com/xid/01y7o6v2m4i-fns3vl

When using a URL short form, the number of parallel kernels can be specified with "?n":

https://wolfram.com/xid/01y7o6v2m4i-vx5qgr

Cloud Kernels (2)
Local Kernels (5)
Use a specific local kernel, given by its absolute path:

https://wolfram.com/xid/01y7o6v2m4i-8owt8v

Alternatively, give the path in the first argument:

https://wolfram.com/xid/01y7o6v2m4i-psgk1g

If no options are needed, RemoteKernelObject can be omitted:

https://wolfram.com/xid/01y7o6v2m4i-gvjrsh

Use a specific local kernel, given by its relative path:

https://wolfram.com/xid/01y7o6v2m4i-rk1263

The number of parallel kernels to launch can be given with "KernelCount":

https://wolfram.com/xid/01y7o6v2m4i-chnmbl

When using a URL short form, the number of parallel kernels can be specified with "?n":

https://wolfram.com/xid/01y7o6v2m4i-nd68rq

For local kernels, the default number of parallel kernels is equal to $ProcessorCount, license permitting:

https://wolfram.com/xid/01y7o6v2m4i-v14q0m


https://wolfram.com/xid/01y7o6v2m4i-1ittmi

Applications (1)Sample problems that can be solved with this function
Properties & Relations (2)Properties of the function, and connections to other functions
A kernel object describes a method for launching a kernel; it does not represent a persistent connection:

https://wolfram.com/xid/01y7o6v2m4i-l3hrd8

Each evaluation launches a new kernel, which is discarded after use:

https://wolfram.com/xid/01y7o6v2m4i-errbmo


https://wolfram.com/xid/01y7o6v2m4i-gjilpb

$DefaultKernels is the list of kernels to use by default for parallel computation:

https://wolfram.com/xid/01y7o6v2m4i-fhs569


https://wolfram.com/xid/01y7o6v2m4i-xi7ybh

Neat Examples (1)Surprising or curious use cases

https://wolfram.com/xid/01y7o6v2m4i-lpe393

Query it for its number of processors:

https://wolfram.com/xid/01y7o6v2m4i-jtxgyq

Update the description with the discovered kernel count:

https://wolfram.com/xid/01y7o6v2m4i-zpdn1g

Launch all of those parallel subkernels:

https://wolfram.com/xid/01y7o6v2m4i-tkrzhl

Wolfram Research (2020), RemoteKernelObject, Wolfram Language function, https://reference.wolfram.com/language/ref/RemoteKernelObject.html.
Text
Wolfram Research (2020), RemoteKernelObject, Wolfram Language function, https://reference.wolfram.com/language/ref/RemoteKernelObject.html.
Wolfram Research (2020), RemoteKernelObject, Wolfram Language function, https://reference.wolfram.com/language/ref/RemoteKernelObject.html.
CMS
Wolfram Language. 2020. "RemoteKernelObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RemoteKernelObject.html.
Wolfram Language. 2020. "RemoteKernelObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RemoteKernelObject.html.
APA
Wolfram Language. (2020). RemoteKernelObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RemoteKernelObject.html
Wolfram Language. (2020). RemoteKernelObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RemoteKernelObject.html
BibTeX
@misc{reference.wolfram_2025_remotekernelobject, author="Wolfram Research", title="{RemoteKernelObject}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/RemoteKernelObject.html}", note=[Accessed: 28-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_remotekernelobject, organization={Wolfram Research}, title={RemoteKernelObject}, year={2020}, url={https://reference.wolfram.com/language/ref/RemoteKernelObject.html}, note=[Accessed: 28-March-2025
]}