EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TELSimpleSSHClient.Open() freezes system for 30 seconds

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#32303
Posted: 02/20/2015 12:29:14
by hillrom (Standard support level)
Joined: 09/18/2014
Posts: 1

For some reason, on an imex35 running Windows CE 6.0, calling TELSimpleSSHClient.Open() causes the whole application to freeze for 30 seconds, CPU jumps to 100%.

This is for version 12.0.260.0.

I know that the simpleSSHClient is synchronous, but 30 seconds seems excessive. The SSHClient is connecting directly to an ethernet device on a USB dongle.

Is this normal behavior?

Here is the code

Code
                // Configure the SSH client.
                _SshClient = new TElSimpleSSHClient();
                _SshClient.Address = ModuleIpAddress;
                _SshClient.Port = ModuleSshPortNumber;
                _SshClient.UseInternalSocket = true;
                _SshClient.AuthenticationTypes = SBSSHConstants.Unit.SSH_AUTH_TYPE_PASSWORD;
                _SshClient.Username = ModuleUsername;
                _SshClient.Password = ModulePassword;

                // Register the required event handlers.
                _SshClient.OnError += OnSshClientOnErrorEvent;
                _SshClient.OnCloseConnection += new SBSSHCommon.TSSHCloseConnectionEvent(OnSshClientOnCloseConnection);
                _SshClient.OnAuthenticationSuccess += OnSshClientOnAuthenticationSuccessEvent;
                _SshClient.OnAuthenticationFailed += OnSshClientOnAuthenticationFailedEvent;
                _SshClient.OnKeyValidate += OnSshClientOnKeyValidateEvent;

                // Open the SSH connection with the WB45 module.
                _SshClient.Open();
#32304
Posted: 02/20/2015 13:39:48
by Eugene Mayevski (EldoS Corp.)

There are several reasons possible. First there's socket connection established, then there's SSH handshake done (which involves some cryptographic operations). 30 seconds is surely too much but it is possible that it's socket layer causing the delay for whatever reason (and it would be nice to check this).

First of all let's try the same code on desktop (possibly with the sample application or with your code, -- it doesn't matter much). Will it work correctly?


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 483 times

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




|

Back to top

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

Got it!