Basic remote procedure call via ssh from Linux to Windows


#1

I have a Julia application running under Linux. I would like to make a couple of remote function calls to another Julia process running on a specific Windows machine, because that Windows machine has special data-acquisition hardware for which only a Win32 driver is available.

I have Julia installed on both the Linux and Windows machine, and I have Microsoft’s OpenSSH port set up such that I can perform password-free ssh logins from Linux to Windows. However, the Linux and Windows machines have of course very different file paths.

The Julia documentation on distributed computing focuses at the moment very much on clusters of worker machines that share the same file-path name space, and where the user may not care much on which exact worker machine a job ends up.

Where do I start if, rather than creating a homogeneous compute cluster, I just want to call Julia functions on one particular machine (to control some hardware there) where Julia and my code are installed on very different file paths (because its a rather different operating system)?

Is there somewhere a lower layer API than the ClusterManager that I can use to open just one ssh channel from a Linux machine to a Windows machine to call there a couple of Julia functions?


#2

While I haven’t done this before, I would start with addprocs (the second method which takes a vector of machine_spec strings as the first argument). You can specify the path to the julia executable on the remote worker using the exename keyword argument and the working directory with the dir keyword argument.


#3

It turned out that the SSHManager in the Distributed package so far only supported ssh servers that invoke a POSIX shell (e.g., bash). I have now added to addprocs() a new keyword argument shell=:wincmd that causes SSHManager to prepage a remote command line for invoking julia --worker via cmd.exe. This is the default shell that sshd invokes in Microsoft’s OpenSSH port for Windows. See pull request #30614.


#4

@mgkuhn I would look at the excellent MobXterm https://mobaxterm.mobatek.net/
It includes an ssh server and maybe it could help with the path issues also.