EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Problems with SSH Keys

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#19723
Posted: 04/09/2012 14:14:42
by Ilia Dimitrov (Basic support level)
Joined: 04/09/2012
Posts: 4

I am trying to use a SFTP client based on the sample sophisticated SFTP client to upload files to a SFTP server (Ipswitch WS_FTP). I can do that on my dev box but when I move the application to our test environment I start getting error 3331 for the same key file I am using on my box. I generated a key pair on the server and tried to use the private key but the result was the same. Then I used PuttyGen to generate yet another key pair but still I am getting the 3331 error. What can be the problem? Why it works on my machine without any problems but fails on a different one?
Thank you,
Ilia
#19724
Posted: 04/09/2012 14:28:27
by Eugene Mayevski (EldoS Corp.)

Check that you properly deploy SecureBlackbox modules. Most likely you've missed one of dependent modules. See deployment instructions in the help file.


Sincerely yours
Eugene Mayevski
#19725
Posted: 04/09/2012 17:27:32
by Ilia Dimitrov (Basic support level)
Joined: 04/09/2012
Posts: 4

The documentation mentions these dlls as required:

SecureBlackbox.SFTP.dll requires SecureBlackbox.SFTPCommon.dll, SecureBlackbox.SSHCommon.dll, SecureBlackbox.SSHClient.dll and SecureBlackbox.dll.

I have them all in the application exe folder but the problem is still there. I even run the installer on the test box but that didn't help either.

Thank you,
Ilia
#19726
Posted: 04/09/2012 23:42:04
by Eugene Mayevski (EldoS Corp.)

Are you able to load the key from the stream into memory block? Check that memory block contains the key (they are text so you can use MessageBox.Show() call) after loading.

Also ensure that you set the license key before the key is loaded. Not setting the license key will lead to weird errors in some cases.


Sincerely yours
Eugene Mayevski
#19739
Posted: 04/10/2012 10:27:08
by Ilia Dimitrov (Basic support level)
Joined: 04/09/2012
Posts: 4

I am able to load in memory all the keys I have used for testing with a small test app.

Also the license key is being loaded first thing before any other actions are performed.

I am using the trial key because we need to make sure the tools are working for us before we commit. Can this be the cause of the problem?

Thank you,
Ilia
#19740
Posted: 04/10/2012 11:09:03
by Eugene Mayevski (EldoS Corp.)

Error 3331 is SB_ERROR_SSH_KEYS_FILE_READ_ERROR . If you can read the file fine, then load the key data to the buffer and then use Load*Key() methods which accept a data buffer rather than a file stream.


Sincerely yours
Eugene Mayevski
#19746
Posted: 04/10/2012 16:49:58
by Ilia Dimitrov (Basic support level)
Joined: 04/09/2012
Posts: 4

Found what the problem is - my app was loading a stale dll in the second environment, and that dll didn't provide the required configuration information (in particular there was no key file name). My fault, sorry for wasting your time :(
Thank you,
Ilia
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

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