I used these code in this post remote kernel through SSH
Needs["SubKernels`RemoteKernels`"]
Parallel`Settings`$MathLinkTimeout = 100
user = "user";
ssh = "export LD_LIBRARY_PATH=;ssh";(*ssh program name.If you install \
GOW on Windows,then this should work,otherwise put the path \
yourself*)
math =
"MathKernel" <>
" -wstp -linkmode Connect `4` -linkname `2` -subkernel -noinit >& \
/dev/null &";
number = 2;(*number of parallel kernels to launch*)
machine = "ipv6 addr";
remote = SubKernels`RemoteKernels`RemoteMachine[machine,
ssh <> " " <> user <> "@" <> machine <> " " <>
" \"" <> math <> "\"", number]
Print[remote // InputForm]
kerns = LaunchKernels[remote]
ParallelEvaluate[$MachineName]
but I can't get those kernels started, and I got a General::time: Operation LaunchKernels timed out after 10. seconds. error. BTW I used rsa keys so no password is required.
My MMA version is 11.2.0, and I'm connecting lower version (11.0.0). I tested connection between two 11.0.0 with the same code and everything worked out fine.
I used ipv6 but I don't think that's the issue here, since in 11.0.0 everything worked out fine.
I also tried connecting two 11.2.0 machine and got
LinkConnect::linkc:
-- Message text not found -- (
LinkObject[39853@10.8.0.6,45079@10.8.0.6, 3, 1])
LinkConnect::linkc:
-- Message text not found -- (
LinkObject[43695@10.8.0.6,34773@10.8.0.6, 3, 1])
LinkConnect::linkc:
-- Message text not found -- (
LinkObject[46231@10.8.0.6,37321@10.8.0.6, 3, 1])
LinkConnect::linkc:
-- Message text not found -- (
LinkObject[42987@10.8.0.6,39781@10.8.0.6, 3, 1])
LinkConnect::linkc:
-- Message text not found -- (
LinkObject[44499@10.8.0.6,43279@10.8.0.6, 3, 1])
LinkConnect::linkc:
-- Message text not found -- (
LinkObject[37985@10.8.0.6,37443@10.8.0.6, 3, 1])