Topic: SERVER_KEXINIT_SENT Error -1009
Iām setting up an SSH server on an Integrity OS environment. However, when a client attempts to connect, the server immediately terminates the connection and logs the following error:
accept error: SERVER_KEXINIT_SENT, -1009
The client initiates the connection from a Windows terminal using the command:
ssh -vvv -i ca-key-pkcs8-attribute.der -o MACs=hmac-sha2-256 -p 2222 user@<ip-Address>
The SSH server is running SSH-2.0-wolfSSHv1.4.20, while the client uses OpenSSH_for_Windows_9.5p1 with LibreSSL 3.8.2.
Server Log is
1970-01-01 00:08:30 [DEBUG] Leaving DoKexInit(), ret = 0
1970-01-01 00:08:30 [DEBUG] PR3: peerMacSz = 0
1970-01-01 00:08:30 [DEBUG] PR4: Shrinking input buffer
1970-01-01 00:08:30 [DEBUG] Entering ShrinkBuffer()
1970-01-01 00:08:30 [DEBUG] buf->bufferSz = 1432
1970-01-01 00:08:30 [DEBUG] buf->idx = 1432
1970-01-01 00:08:30 [DEBUG] buf->length = 1432
1970-01-01 00:08:30 [DEBUG] SB: usedSz = 0, forcedFree = 1
1970-01-01 00:08:30 [DEBUG] SB: releasing dynamic buffer
1970-01-01 00:08:30 [DEBUG] Leaving ShrinkBuffer()
1970-01-01 00:08:30 [DEBUG] PR5: txCount = 464, rxCount = 1432
1970-01-01 00:08:30 [DEBUG] PR1: size = 8
1970-01-01 00:08:30 [INFO] GID: readjust size
1970-01-01 00:08:30 [DEBUG] Receive: recvd = -1
1970-01-01 00:08:30 [DEBUG] accept error: SERVER_KEXINIT_SENT, -1009
1970-01-01 00:08:30 [DEBUG] Entering wolfSSH_get_error_name()
1970-01-01 00:08:30 [DEBUG] Entering wolfSSH_free()
1970-01-01 00:08:30 [DEBUG] Entering sshResourceFree()
1970-01-01 00:08:30 [DEBUG] Entering ShrinkBuffer()
1970-01-01 00:08:30 [DEBUG] buf->bufferSz = 16
1970-01-01 00:08:30 [DEBUG] buf->idx = 0
1970-01-01 00:08:30 [DEBUG] buf->length = 0
1970-01-01 00:08:30 [DEBUG] SB: usedSz = 0, forcedFree = 1
1970-01-01 00:08:30 [DEBUG] Leaving ShrinkBuffer()
The client log is
debug3: order_hostkeyalgs: no algorithms matched; accept original
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
Bad packet length 825833264.
debug2: sshpkt_disconnect: sending SSH2_MSG_DISCONNECT: Packet corrupt
debug3: send packet: type 1
ssh_dispatch_run_fatal: Connection to <ip_address> port 2222: message authentication code incorrect