Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/377.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用于java连接的Ganymed SSH问题_Java_Ssh - Fatal编程技术网

用于java连接的Ganymed SSH问题

用于java连接的Ganymed SSH问题,java,ssh,Java,Ssh,我们正在使用Ganymed SSH库,在对另一台机器执行SSH时遇到了这个错误 [root@XXXX test]# java -classpath .:ganymed-ssh2-build210.jar Basic ERROR:java.io.IOException: There was a problem while connecting to 10.X.X.X:22 java.io.IOException: There was a problem while connecting to

我们正在使用Ganymed SSH库,在对另一台机器执行SSH时遇到了这个错误

[root@XXXX test]# java -classpath .:ganymed-ssh2-build210.jar Basic 

ERROR:java.io.IOException: There was a problem while connecting to 10.X.X.X:22
java.io.IOException: There was a problem while connecting to 10.X.X.X:22
    at ch.ethz.ssh2.Connection.connect(Connection.java:699)
    at ch.ethz.ssh2.Connection.connect(Connection.java:490)
    at Basic.main(Basic.java:27)
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:229)
    at ch.ethz.ssh2.Connection.connect(Connection.java:655)
    ... 2 more
Caused by: java.io.IOException: Cannot read full block, EOF reached.
    at ch.ethz.ssh2.crypto.cipher.CipherInputStream.getBlock(CipherInputStream.java:81)
    at ch.ethz.ssh2.crypto.cipher.CipherInputStream.read(CipherInputStream.java:108)
    at ch.ethz.ssh2.transport.TransportConnection.receiveMessage(TransportConnection.java:231)
    at ch.ethz.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:669)
    at ch.ethz.ssh2.transport.TransportManager$1.run(TransportManager.java:468)
    at java.lang.Thread.run(Thread.java:636)
有人能解释一下这里的问题吗?我们应该从哪里开始调试?
来自普通shell的SSH访问正常工作。

在solaris 10上的141742-01/02修补程序之后,您的公钥可能出现了一些问题。

SSH失败

ssh/sshd中启用的aes192/aes256支持在S10u3或更旧版本上不起作用

一种解决方法是禁用对ssh和sshd使用aes192/aes256密码。更改两个配置文件/etc/ssh/ssh\u config和/etc/ssh/sshd\u config,并添加以下行:

密码aes128 ctr、aes128 cbc、arcfour、3des cbc、河豚cbc

您必须重新启动sshd以获取更改(“svcadm restart ssh”)

资料来源:

目标计算机或源计算机的公钥?服务器日志显示了什么?您可以尝试提高服务器上的调试级别以获取更多信息。:(我没有在调试模式下重新启动目标sshd的权限您也可以尝试在sshd守护进程线程上执行
strace
(尽管您可能有权这样做…)