EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Error event handler not being executed

Posted: 11/05/2013 07:45:16
by Keith Huster (Standard support level)
Joined: 11/05/2013
Posts: 5

I am attempting to test recovery from a dropped SSH connection using the Secure Blackbox .NET edition v10.0.233.0. For this test, I create a Secure Blackbox SSH client connection from my Windows CE 6.0 device to a remote Linux SSH server. I then disconnect the remote SSH server (power it down) then bring the remote SSH server back up. I then attempt to execute a SendText() method from my SSH client.

The expected behavior is that the OnError event handler will be called due to the broken SSH connection. However, the actual behavior is that the SendText() method throws a SBSimpleSSH.EElSimpleSSHClientError exception with the error message "Connection lost (error code is 10038)".

Per the online documentation I had expected this type of error to be handled through the OnError event handler. I have verified that I am properly registering the OnError event handler. However, it never seems to be executed. Am I doing something wrong or is this the expected behavior?
Posted: 11/05/2013 07:49:25
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

OnError event is used to handle SSH protocol related errors. Connection loss is socket level error that results in corresponding exception.
Posted: 11/05/2013 08:35:22
by Keith Huster (Standard support level)
Joined: 11/05/2013
Posts: 5

That makes sense but it is somewhat confusing since the error codes listed in the OnError event handler also appear to handle errors such as this (e.g. ERROR_SSH_CONNECTION_LOST, ERROR_SSH_NOT_CONNECTED, etc...). I guess I will just need to protect my code using both try-catch blocks and OnError event registration for all communication attempts.
Posted: 11/05/2013 09:20:01
by Eugene Mayevski (Team)

SSH errors are errors that are reported on SSH layer, i.e. sent by the SSH server or reported by the local SSH layer. Since SSH is used in particular to forward socket connections, it has errors that sound similar to socket errors.

However, SSH protocols are not bound to socket layer (technically you can run SSH over pigeon mail or telegraph). Consequently socket errors are reported differently.

Sincerely yours
Eugene Mayevski



Topic viewed 440 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!