SSHJ released a new version (0.38.0) in which they improved their support for strict key exchanges. Unfortunately this also introduced a bug on their end, as the hearbeater is writing packets to the server which aren't allowed during key exchange (KEX_INIT must be the first packet, however due to the hearbeater an IGNORE packet is the first leading to the error strict KEX violation: KEXINIT was not the first packet).
Modification
Bump SSHJ to 0.38.0 and write a custom heartbeater which checks if the key exchange is done before sending heartbeat packets.
Result
SSHJ is updated to 0.38.0 and everything works as expected again.
Motivation
SSHJ released a new version (0.38.0) in which they improved their support for strict key exchanges. Unfortunately this also introduced a bug on their end, as the hearbeater is writing packets to the server which aren't allowed during key exchange (KEX_INIT must be the first packet, however due to the hearbeater an IGNORE packet is the first leading to the error
strict KEX violation: KEXINIT was not the first packet
).Modification
Bump SSHJ to 0.38.0 and write a custom heartbeater which checks if the key exchange is done before sending heartbeat packets.
Result
SSHJ is updated to 0.38.0 and everything works as expected again.