SSH Connection issues using functions on file exchange

37 vues (au cours des 30 derniers jours)
Richard Mart
Richard Mart le 4 Fév 2021
Trying to use SSH/SFTP/SCP For Matlab (v2) by David Freedman to connect to a remote server. I followed in his examples:
ssh2_conn = ssh2_config(HOSTNAME,USERNAME,PASSWORD,PORT);
ssh2_conn.port = 2200;
and I was able to generate the ssh2_conn structure with the correct information for my server. However, when I run any basic connection commands I get a string of errors very similar to what andrea dal monte wrote in the ratings on 30 Nov 2020. I respected the author's request to not bloat the "Comments and Reviews" section with my own similar error, and contacted him directly, but he has not responded. Essentially the "SSH2 could not connect to the ssh2 host" is the root issue. I can connect via ssh via other 3rd party programs like Bitvise and Putty. Any help would be greatly appreciated as I am trying to transfer files automatically with my matlab script to a remote server at a specific time of day.
  2 commentaires
Jeffery
Jeffery le 22 Sep 2023
Have you found a solution on this matter?
Jean-Baptiste
Jean-Baptiste le 9 Mar 2024
I have the same issue. I think it is coming from the java function. While debugging, this is the error message:
Java exception occurred:
java.io.IOException: There was a problem while connecting to 192.168.0.22:22
at ch.ethz.ssh2.Connection.connect(Connection.java:753)
at ch.ethz.ssh2.Connection.connect(Connection.java:543)
Caused by: java.io.IOException: Key exchange was not finished, connection is closed.
at ch.ethz.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:91)
at ch.ethz.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:231)
at ch.ethz.ssh2.Connection.connect(Connection.java:709)
... 1 more
Caused by: java.io.IOException: Cannot negotiate, proposals do not match.
at ch.ethz.ssh2.transport.KexManager.handleMessage(KexManager.java:413)
at ch.ethz.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:756)
at ch.ethz.ssh2.transport.TransportManager$1.run(TransportManager.java:470)
at java.lang.Thread.run(Unknown Source)

Connectez-vous pour commenter.

Réponses (1)

Jean-Baptiste
Jean-Baptiste le 12 Mar 2024
Modifié(e) : Walter Roberson le 12 Mar 2024

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by