MATLAB Answers

Connecting to cluster fails: Algorithm negotiation fail

4 views (last 30 days)
TZ on 26 Jan 2021
Commented: TZ on 25 Feb 2021
I am trying to connect my MATLAB to a university cluster, to submit parallel simulations to its Slurm scheduler.
While validating the cluster profil, the process is already teminated when trying to create the connection to the cluster running clusterAccess.connect() inside of RemoteClusterAccess.m
MATALB is showing me the error message below. Stating that a leasable connection can't be created, because the Algorithm negotiation has failed:
In a second try I used the scripts from the ssh/sftp/scp (v2) interface.
This way I can try to set the connection with the Ganymed-SSH2 javalib. Again the process is terminated when creating the connection, here running ssh2_struct.connection.connect() fails. The commannd window states this:
In general, connecting to the cluster using PuTTY works fine. In PuTTY I also found some settings regarding Algorithms.
My thought understanding the problem is, that I need to change connection settings in MATALB or inside the Java class so the connection Algorithms fit the cluster. But I am not sure if it is the right approach and where to do so.
The cluster is running on Linux while my MATLAB is running on Windows, would it be helpful to try to connect from MATLAB running on a Linux system?
Does someone has another idea what could cause the problem or what I can try out?

Answers (1)

Raymond Norris
Raymond Norris on 26 Jan 2021
Please reach out to Technical Support ( and have them contact me about this. I recognize your cluster and have worked to support it in the past. We've built Slurm scripts for your cluster that we could probably provide to you as well to improve your experience.
To answer your question directly (because we had someone else running into SSH issues as well), the JSch jar-file needs to be updated. If you ask Support about this as well, they ought to be able to point you to instructions on how to do so.
  1 Comment
TZ on 25 Feb 2021
Thanks for the support!
To update the JSch jar-file we needed to download jsch-0.1.61.jar, rename it to jsch.jar and replace the existing file in <matlabroot>/java/jarext with it.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!