SSH Connection issues using functions on file exchange

22 Ansichten (letzte 30 Tage)
Richard Mart
Richard Mart am 4 Feb. 2021
Bearbeitet: Walter Roberson am 12 Mär. 2024
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 Kommentare
Jeffery
Jeffery am 22 Sep. 2023
Have you found a solution on this matter?
Jean-Baptiste
Jean-Baptiste am 9 Mär. 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)

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jean-Baptiste
Jean-Baptiste am 12 Mär. 2024
Bearbeitet: Walter Roberson am 12 Mär. 2024

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by