"Key Re-Exchange" Event
Posted: Thu 21 Oct 2021 10:39
Is it possible to know in the TScSSHClient, when the SSH Server initiates a Key Re-Exchangehttps://datatracker.ietf.org/doc/html/rfc4253#section-9
Background to that question is the following. We have a connection to a SSH server which is kept active for 24 hours. every 20 to 30 seconds the client sends a command to the server via TScSSHShell with ExecuteCommand, to get some counters from the server. Sometimes this command seems to collide with the Key Re-Exchange.
This means the server sends the Key Re-Exchange request and waits for an according response. But the client tries to send the command with with the Shell. Which results in the following error message on the server:
Unexpected packet type 94, expected 21
Packet type 94 means SSH_MSG_CHANNEL_OPEN (94) and 21 is SSH_MSG_NEWKEYS (21).
I'm now looking for a way to get notified when the Key Re-Exchange happens so i can time the Shell accordingly.
Background to that question is the following. We have a connection to a SSH server which is kept active for 24 hours. every 20 to 30 seconds the client sends a command to the server via TScSSHShell with ExecuteCommand, to get some counters from the server. Sometimes this command seems to collide with the Key Re-Exchange.
This means the server sends the Key Re-Exchange request and waits for an according response. But the client tries to send the command with with the Shell. Which results in the following error message on the server:
Unexpected packet type 94, expected 21
Packet type 94 means SSH_MSG_CHANNEL_OPEN (94) and 21 is SSH_MSG_NEWKEYS (21).
I'm now looking for a way to get notified when the Key Re-Exchange happens so i can time the Shell accordingly.