EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTPClient.AuthenticationTypes

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#8342
Posted: 12/02/2008 10:31:50
by Paul Pidoprygora (Standard support level)
Joined: 12/01/2008
Posts: 6

I have OnAuthenticationFailed and OnAuthenticationSuccess defined. My application works as expected and I am able to connect to the remote SFTP server and download the files, however, during the handshake process OnAuthenticationFailed is fired, followed immediately by OnAuthenticationSuccess.

My OnAuthenticationFailed writes trace/log entry "Authentication type " + AuthenticationType.ToString() + " failed" like in one of the BlackBox examples that come with the product, and in this case, it says that Authentication type 16 failed. This happens only when I connect to one particular server (which does not support pipelining, because I had to set PipelineLength = 1, otherwise I was getting "wrong socket state 0 in send, error code 96258).

During SftpClient setup, I set AuthenticationTypes as follows:
SftpClient.AuthenticationTypes = SftpClient.AuthenticationTypes Or SBSSHConstants.Unit.SSH_AUTH_TYPE_PUBLICKEY

The question is: where does AuthenticationType 16 come from, if I explicitly asked only for SSH_AUTH_TYPE_PUBLICKEY? Isn't 16 a SSH_AUTH_TYPE_KEYBOARD?

Thanks!
#8343
Posted: 12/02/2008 11:10:54
by Ken Ivanov (EldoS Corp.)

Quote
During SftpClient setup, I set AuthenticationTypes as follows:
SftpClient.AuthenticationTypes = SftpClient.AuthenticationTypes Or SBSSHConstants.Unit.SSH_AUTH_TYPE_PUBLICKEY

SftpClient.AuthenticationTypes property is set to SBSSHConstants.Unit.SSH_AUTH_TYPE_PASSWORD Or SBSSHConstants.Unit.SSH_AUTH_TYPE_KEYBOARD by default. By Or'ing the value of the property with SBSSHConstants.Unit.SSH_AUTH_TYPE_PUBLICKEY you are adding the public key authentication type without disabling password-based and keyboard-interactive authentication types.
#8344
Posted: 12/02/2008 11:31:36
by Paul Pidoprygora (Standard support level)
Joined: 12/01/2008
Posts: 6

Thank you for your prompt response, Innokentiy!
It wasn't obvious for me that there were default AuthenticationTypes on initialization. I will modify my code accordingly to handle that. Thanks again!

Reply

Statistics

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