EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Unable to Connect with Sample SSHClient

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#6720
Posted: 06/24/2008 00:15:31
by robert reeves (Basic support level)
Joined: 06/23/2008
Posts: 1

Using the .net secure black box with VS2008, I built and executed the SimpleSSHClient sample. It simply would not connect. Putty certainly does work.


There are 2 error lines:
- "SSH error 11
- "SSH connection failed:- Arithmetic operation resulted in an overflow"

The server I am using is Reflections Secure IT from Attachmate.


I have checked through the article at http://www.eldos.com/sbbdev/articles/4796.php. And I am unable to figure out how to turn off algorithims as per the articles section #5

--robert


#6723
Posted: 06/24/2008 01:28:58
by Ken Ivanov (EldoS Corp.)

Error 11 stands for ERROR_SSH_INVALID_PACKET_SIZE. It is not a common error for SSH negotiation, so you are going in right direction by looking at that how-to article.

The algorithms can be turned on and off using the following code:
C#:
Client.set_EncryptionAlgorithms(SBSSHConstants.Unit.SSH_EA_TWOFISH256, false);

VB.NET:
Client.EncryptionAlgorithms(SBSSHConstants.Unit.SSH_EA_TWOFISH256) = false

You can create a simple loop to disable all the algorithms:

for (int i = SBSSHConstants.Unit.SSH_EA_FIRST; i <= SBSSHConstants.Unit.SSH_EA_LAST; i++)
{
Client.set_EncryptionAlgorithms(i, false);
}

and then enable particular ones separately:

Client.set_EncryptionAlgorithms(SBSSHConstants.Unit.SSH_EA_3DES, true);

Similar code can be used to enable/disable KEX, MAC and public key algorithms.
#8842
Posted: 02/10/2009 19:37:44
by Chad Hoyt (Standard support level)
Joined: 11/30/2007
Posts: 3

We recently upgraded SFTP and SSL from assembly versions 5.2.0.124 to 6.1.0.150 in order to take advantage of the improved FEAT commands for SFTP to one of our clients. We reference from a .net script component in an SSIS pkg.

As a result of this upgrade, my package now recieves infrequent and intermittent "Arithmetic operation resulted in an overflow" errors. Some files will work for clients while others do not. This issue occurs across SFTP to
different clients and not all with the same host. I have also tried the recommendation above for disable of Encryption Algorithms with no success.

I am occasionally able to simulate this error if I debug and step into my event handler for TElSimpleSFTPClient.OnKeyValidate but only if I pause inside the delegate method for more than a few seconds before proceeding debug and I do not catch any exceptions within that event delegate. Perhaps there is another event that I need to handle? I currently have delegates for: OnKeyValidate, OnError, OnAuthenticationAttempt, OnAuthenticationFailed, OnAuthenticationStart, OnAuthenticationSuccess, OnAuthenticationKeyboard, OnBanner, OnPrivateKeyNeeded, and MessageLoop.

Stack Trace is as follows:

Exception Message: Arithmetic operation resulted in an overflow. Source: SecureBlackbox Stack Trace: at SBUtils.__Global.SetLength(Byte[]& aBytes, Int32 aLength)
at SBSSHClient.TElSSHClient.DataAvailable()
at SBSimpleSftp.TElSimpleSFTPClient.DataAvailable()
at SBSimpleSftp.TElSimpleSFTPClient.IntMessageLoop()
at SBSimpleSftp.TElSimpleSFTPClient.DoMessageLoop()
at SBSimpleSftp.TElSimpleSFTPClient.Open()
at ScriptTask_07c68a90933f45c4bbf0f29a7d067aac.BlackboxSFTP.SendFile() in dts://Scripts/ScriptTask_07c68a90933f45c4bbf0f29a7d067aac/BlackboxSFTP:line 132
Any help is much appreciated.
Chad
#8844
Posted: 02/11/2009 01:34:23
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

Does this problem always occur when connecting to the same servers? In other words, did you have a chance to notice a situation that one connection to a server succeeds, while another connection *to the same server* fails?

It is very likely that the server just suddenly closes the connection due to some internal failure. Have you tried setting AutoAdjustCiphers to true?
#8869
Posted: 02/12/2009 09:40:41
by Chad Hoyt (Standard support level)
Joined: 11/30/2007
Posts: 3

The issue exists with different servers and not with every transmission.

Thank you for the suggestion. We will test this and post again if still exists.
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

Topic viewed 4624 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!