Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid packet length #459

Closed
ghost opened this issue Oct 22, 2018 · 3 comments
Closed

Invalid packet length #459

ghost opened this issue Oct 22, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 22, 2018

Hi!

Could you help me with debbuging this issue? When it fails there is always same packet length: 1349676916 and value 6f 63 6f 6c. Could it be that sshj does not understand some message?

SSHJ client 0.26
Server: SSH-2.0-OpenSSH_7.6p1 Ubuntu-4

2018-10-22 15:54:16.140 ERROR 25425 --- [         reader] n.schmizz.sshj.transport.TransportImpl   : Dying because - invalid packet length: 1349676916

net.schmizz.sshj.transport.TransportException: invalid packet length: 1349676916
	at net.schmizz.sshj.transport.Decoder.decryptLength(Decoder.java:145) ~[sshj-0.26.0.jar:0.26.0]
	at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:75) ~[sshj-0.26.0.jar:0.26.0]
	at net.schmizz.sshj.transport.Decoder.received(Decoder.java:170) ~[sshj-0.26.0.jar:0.26.0]
	at net.schmizz.sshj.transport.Reader.run(Reader.java:59) ~[sshj-0.26.0.jar:0.26.0]

2018-10-22 15:54:16.140  INFO 25425 --- [         reader] n.schmizz.sshj.transport.TransportImpl   : Disconnected - PROTOCOL_ERROR
2018-10-22 15:54:16.141 ERROR 25425 --- [pool-5-thread-1] net.schmizz.concurrent.Promise           : <<kex done>> woke to: net.schmizz.sshj.transport.TransportException: [PROTOCOL_ERROR] invalid packet length: 1349676916
2018-10-22 15:54:16.142 ERROR 25425 --- [pool-5-thread-1] c.c.remoteaccess.ssh.SshProtocolHandler  : Ssh session initialization failure. invalid packet length: 1349676916

net.schmizz.sshj.transport.TransportException: invalid packet length: 1349676916
	at net.schmizz.sshj.transport.Decoder.decryptLength(Decoder.java:145) ~[sshj-0.26.0.jar:0.26.0]
	at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:75) ~[sshj-0.26.0.jar:0.26.0]
	at net.schmizz.sshj.transport.Decoder.received(Decoder.java:170) ~[sshj-0.26.0.jar:0.26.0]
	at net.schmizz.sshj.transport.Reader.run(Reader.java:59) ~[sshj-0.26.0.jar:0.26.0]```

@hierynomus
Copy link
Owner

Can you give a bit more logging? When does this occur? During authentication?

@ghost
Copy link
Author

ghost commented Oct 23, 2018

It's during key exchange and it's somehow related to missing home directory: Could not chdir to home directory /home/sshtest2: No such file or directory

@ghost
Copy link
Author

ghost commented Oct 25, 2018

Closing, because the issue was not related with library itself but with NPE in another part of the system.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant