Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
7k views
in Java FTP by (160 points)
I'm trying to connect by using SSHClient class to the host. It is failing giving the following exception and not very much detail.
I was able to connect from the unix command prompt sucessfully.

Any help is appreciated.

08/07/11 16:01:14 Exception occuredjava.io.IOException: Unexpected message received
08/07/11 16:01:14 java.io.IOException: Unexpected message received
08/07/11 16:01:14 at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.readMessage(Unknown Source)
08/07/11 16:01:14 at com.enterprisedt.net.j2ssh.transport.kex.DhGroup1Sha1.performClientExchange(Unknown Source)
08/07/11 16:01:14 at com.enterprisedt.net.j2ssh.transport.TransportProtocolClient.performKeyExchange(Unknown Source)
08/07/11 16:01:14 at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.beginKeyExchange(Unknown Source)
08/07/11 16:01:14 at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.A(Unknown Source)
08/07/11 16:01:14 at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(Unknown Source)
08/07/11 16:01:14 at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.run(Unknown Source)
08/07/11 16:01:14 at java.lang.Thread.run(Thread.java:595)

3 Answers

0 votes
by (162k points)
Please email us a log file set to the ALL level and we'll take a look. support at enterprisedt dot com.
0 votes
by (160 points)
See additional logging below.
Thanks for your assistance.

INFO [LicenseProperties] 14 Jul 2008 09:46:48.357 : Licence expiry date: 31 Dec 2099
INFO [LicenseProperties] 14 Jul 2008 09:46:48.357 : Production licence
DEBUG [SSHFTPClient] 14 Jul 2008 09:46:48.359 : Class: com.enterprisedt.net.ftp.ssh.SSHFTPClient
Version: 1.3.2
Build timestamp: 22-Nov-2006 12:28:03 GMT
Java version: 1.5.0_06
CLASSPATH:
OS name: SunOS
OS arch: sparc
OS version: 5.10

DEBUG [SSHFTPClient] 14 Jul 2008 09:46:48.367 : Created SFTP client.
INFO [SSHFTPClient] 14 Jul 2008 09:46:48.368 : SSHFTPClient settings validated.
DEBUG [SSHFTPClient] 14 Jul 2008 09:46:48.368 : Connecting to xsrprd.uhc.com:22
DEBUG [TransportProviderFactory] 14 Jul 2008 09:46:48.368 : Connecting to xsrprd.uhc.com:22 via standard socket
DEBUG [SocketTransportProvider] 14 Jul 2008 09:46:48.368 : Timeout == 0
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.790 : Starting transport protocol
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.793 : Registering transport protocol messages with inputstream
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.794 : Negotiating protocol version
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.794 : Local identification: SSH-2.0-edtFTPj/PRO-1.3.2 [CLIENT]
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.839 : EOL is guessed at LF
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.839 : Remote identification: SSH-2.0-XFB.Gateway Unix
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.839 : Protocol negotiation complete
ALL [TransportProtocolCommon] 14 Jul 2008 09:46:51.841 : Name=SSH_MSG_KEX_INIT,MessageId=20
Supported Kex diffie-hellman-group1-sha1
Supported Public Keys ssh-dss,ssh-rsa
Supported Encryption Client->Server blowfish-cbc,3des-cbc,aes128-cbc,aes256-cbc,aes192-cbc
Supported Encryption Server->Client blowfish-cbc,3des-cbc,aes128-cbc,aes256-cbc,aes192-cbc
Supported Mac Client->Server hmac-sha1,hmac-md5-96,hmac-md5,hmac-sha1-96
Supported Mac Server->Client hmac-sha1,hmac-md5-96,hmac-md5,hmac-sha1-96
Supported Compression Client->Server none,zlib
Supported Compression Server->Client none,zlib
Supported Languages Client->Server
Supported Languages Server->Client
First Kex Packet Follows [FALSE]
ALL [TransportProtocolCommon] 14 Jul 2008 09:46:51.883 : Received unregistered message: Name=SSH_MSG_KEX_INIT,MessageId=20
Supported Kex diffie-hellman-group1-sha1
Supported Public Keys ssh-rsa,ssh-dss
Supported Encryption Client->Server aes128-cbc,3des-cbc
Supported Encryption Server->Client aes128-cbc,3des-cbc
Supported Mac Client->Server hmac-sha1,hmac-md5
Supported Mac Server->Client hmac-sha1,hmac-md5
Supported Compression Client->Server none
Supported Compression Server->Client none
Supported Languages Client->Server
Supported Languages Server->Client
First Kex Packet Follows [FALSE]
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.883 : Received remote key exchange init message
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.884 : Starting key exchange
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.884 : Determine Algorithm
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.884 : Client Algorithms: [diffie-hellman-group1-sha1]
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.884 : Server Algorithms: [diffie-hellman-group1-sha1]
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.884 : Returning diffie-hellman-group1-sha1
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:51.884 : Key exchange algorithm: diffie-hellman-group1-sha1
INFO [DhGroup1Sha1] 14 Jul 2008 09:46:51.884 : Starting client side key exchange.
ALL [TransportProtocolCommon] 14 Jul 2008 09:46:51.922 : Name=SSH_MSG_KEXDH_INIT,MessageId=30,e=16069985848526513239179197593901635927378038841381619934
1472289628944659635199991237717337666871409648361884058367174403078831525718463012337814227210156
4208677056131851120173829480540857710516649012002516654198817417009953514499537207134949318452168
02431262531793635165319186440435657670643684394831481473
ERROR [TransportProtocolCommon] 14 Jul 2008 09:46:52.81 : The Transport Protocol thread failed : Unexpected message received
java.io.IOException: Unexpected message received
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.readMessage(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.kex.DhGroup1Sha1.performClientExchange(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolClient.performKeyExchange(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.beginKeyExchange(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.A(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)

DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:52.83 : stop() called
DEBUG [TransportProtocolCommon] 14 Jul 2008 09:46:52.83 : The Transport Protocol has been stopped
0 votes
by (162k points)
I vaguely recall a problem like this being fixed, although I can't see it in the revision history. Since you are using 1.3.2, you should upgrade to 2.0.1 and more than likely it will fix your problem. You will need to recompile if you do this.

Categories

...