EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How do i resolve SBSftpCommon.EElSFTPError

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#9432
Posted: 03/27/2009 04:05:03
by Simon James (Basic support level)
Joined: 03/27/2009
Posts: 5

Hello,
I'm having problems using SFTP. As far as i can tell the connection is opened ok but when i try OpenDirectory i recieve SBSftpCommon.EElSFTPError with no other info on whats wrong. I've setup the client with the following paramters. Am i missing something?

Code
SBUtils.Unit.SetLicenseKey(SBUtils.Unit.BytesOfString(key));
TElSimpleSFTPClient SftpClient = new TElSimpleSFTPClient();
SftpClient.Address = "myservices";
SftpClient.Port = 22;
SftpClient.Username = "username";
SftpClient.Password = "pass";
SftpClient.OnKeyValidate += new TSSHKeyValidateEvent(Client_OnKeyValidate);


Also i'm not really sure how to use the following method. How do i check the key validity?

Code
static private void Client_OnKeyValidate(object Sender, TElSSHKey ServerKey, ref bool Validate)
        {
            //System.Console.WriteLine("Server key received");
            Validate = true; // NEVER do this. You MUST check the key validity somehow
        }
#9433
Posted: 03/27/2009 05:06:11
by Ken Ivanov (EldoS Corp.)

Quote
I'm having problems using SFTP. As far as i can tell the connection is opened ok but when i try OpenDirectory i recieve SBSftpCommon.EElSFTPError with no other info on whats wrong.

Does the sample application (SimpleSFTPDemo) exposes the same problem?

Quote
Also i'm not really sure how to use the following method. How do i check the key validity?

The article explains key validation procedure in detail.
#9434
Posted: 03/27/2009 05:13:55
by Simon James (Basic support level)
Joined: 03/27/2009
Posts: 5

In the end i copied the demo to my project and tweaked it to do what i wanted and it worked fine. Oh and thanks for the article link.

Simon

Reply

Statistics

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