EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Unable to connect to SFTP Site with Demo Projects

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#16283
Posted: 04/28/2011 08:12:28
by Joe Garro (Standard support level)
Joined: 04/16/2009
Posts: 4

I am able to connect to an SFTP server using Filezilla without issues. However when I attempt to use your SimpleSftpDemo to connect it gives an error. (attached screen shot)

I'm using SecureBlackbox - version 7.0.155 (I assume my license does not include an upgrade to v8...it there a newer version of 7 to use?)

After reviewing the existing posts with similar errors I added the following to the code:

Me.SftpClient.AuthenticationTypes = SBSSHConstants.Unit.SSH_AUTH_TYPE_KEYBOARD

Still no luck. Please help. Thanks
Joe


#16284
Posted: 04/28/2011 08:27:29
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

The line you added disables all authentication methods except keyboard-interactive. So the first thing to do is to amend that line in the following way:

Me.SftpClient.AuthenticationTypes = Me.SftpClient.AuthenticationTypes Or SBSSHConstants.Unit.SSH_AUTH_TYPE_KEYBOARD

Second, please check that you have both Username and Password properties set to correct values. If you still experience problems after modifying the above line of code, could you please post new connection log screen shot here?
#16285
Posted: 04/28/2011 08:41:22
by Joe Garro (Standard support level)
Joined: 04/16/2009
Posts: 4

Well in the initialize I have the following line:

Me.SftpClient.AuthenticationTypes = SBSSHConstants.Unit.SSH_AUTH_TYPE_KEYBOARD

But in the Connect it has:

SftpClient.AuthenticationTypes = SftpClient.AuthenticationTypes Or SBSSHConstants.Unit.SSH_AUTH_TYPE_PUBLICKEY

Code Segment from Connect():

******************************************************************************
KeyStorage.Clear()
Dim key As New TElSSHKey
Dim privateKeyAdded As Boolean = False
If dlg.edPrivateKey.TextLength > 0 Then
Dim pwd As String
pwd = InputDialog("Enter password", "Enter password for private key:", "")
Dim err As Integer
err = key.LoadPrivateKey(dlg.edPrivateKey.Text, pwd)
If err = 0 Then
KeyStorage.Add(key)
SftpClient.AuthenticationTypes = SftpClient.AuthenticationTypes Or SBSSHConstants.Unit.SSH_AUTH_TYPE_PUBLICKEY
privateKeyAdded = True
Else
Log("Private key file could not be loaded due to error " + err.ToString(), True)
End If
End If

If Not privateKeyAdded Then
SftpClient.AuthenticationTypes = SftpClient.AuthenticationTypes And Not SBSSHConstants.Unit.SSH_AUTH_TYPE_PUBLICKEY
End If

******************************************************************************

The username and password are being set correctly at runtime via the form.

Please advise

Thanks
Joe
#16286
Posted: 04/28/2011 08:55:05
by Ken Ivanov (EldoS Corp.)

Please also enable the password-based authentication type that you had cut off:

Me.SftpClient.AuthenticationTypes = SBSSHConstants.Unit.SSH_AUTH_TYPE_KEYBOARD Or SBSSHConstants.Unit.SSH_AUTH_TYPE_PASSWORD
#16287
Posted: 04/28/2011 09:15:17
by Joe Garro (Standard support level)
Joined: 04/16/2009
Posts: 4

OK, done. I've attached the new error display.

Thanks
Joe


#16288
Posted: 04/28/2011 09:35:43
by Ken Ivanov (EldoS Corp.)

The things are becoming more interesting. The log shows that password-based authentication has failed - i.e. that the server didn't accept your username and/or password for some reason. Have you used exactly the same credentials as you did [successfully] with FileZilla?
#16289
Posted: 04/28/2011 09:42:46
by Joe Garro (Standard support level)
Joined: 04/16/2009
Posts: 4

Yes, I am able to connect with FileZilla using the exact same host, username, and password.

Could it be an issue with the version I'm using?

Also, I'm running on Win7 64-bit, possible issue?

Thanks
Joe
#16290
Posted: 04/28/2011 10:17:12
by Ken Ivanov (EldoS Corp.)

Well, the version is unlikely to be the reason. We need you to do a small test with your server. As the forum does not accept large attachments, I have created a Helpdesk ticket for you. Let's continue there.
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.

Reply

Statistics

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