EldoS | Feel safer!

Software components for data protection, secure storage and transfer

how to connect SSH Server with the server uses keyboard-interactive ?

Posted: 04/14/2009 21:25:05
by jacky su (Basic support level)
Joined: 04/13/2009
Posts: 2

Hi ...
i try to use SSHDemo.exe(SecureBlackbox's sample) to my SSH server.
it always can not work.. it can connect to any SSH Server without keyboard-interactive. but cant connect server uses keyboard-interactive..

Message as below ...
Client Socket Connected
Server key [A62286B0D01372E336EC4E951A2E48DD] received
Authentication failed, AuthType= 16
Authentication failed, AuthType= 2
Error 114
Connection closed.
i modified my code as the members of the forum say.

void __fastcall TForm1::Button1Click(TObject *Sender)
TElSSHKey* Key;

if (!Connected)
Connection = NULL;
if (CheckBox1->Checked)
Client->Versions << sbSSH1;
if (CheckBox2->Checked)
Client->Versions << sbSSH2;
Client->UserName = Edit3->Text;
Client->Password = Edit4->Text;

Key = new TElSSHKey();
if ((Edit6->Text.Length() != 0) && (Key->LoadPrivateKey(Edit6->Text, "") == 0))
Client->AuthenticationTypes = Client->AuthenticationTypes | SSH_AUTH_TYPE_PUBLICKEY;
Client->AuthenticationTypes = Client->AuthenticationTypes & (~SSH_AUTH_TYPE_PUBLICKEY);

*** Client->AuthenticationTypes = Client->AuthenticationTypes | (~SSH_AUTH_TYPE_PASSWORD);
*** Client->AuthenticationTypes = Client->AuthenticationTypes | (~SSH_AUTH_TYPE_KEYBOARD);
delete Key;

ClientSocket1->Host = Edit1->Text;
ClientSocket1->Port = atoi((const char *) Edit2->Text.c_str());
Button1->Caption = "Disconnect";
Connected = true;
if (Connection)
Button1->Caption = "Connect";
Connected = false;
can any one help me..... thanks
my tools are
c++ builder5 and secureBlackbox Version 3.2.53
Posted: 04/14/2009 23:29:21
by Ken Ivanov (Team)

Do you handle OnAuthenticationKeyboard event? You must handle it to make the things work.

Actually, it's a good idea to upgrade to the latest SecureBlackbox version. First of all, SBB7 automatically handles keyboard-interactive authentication (no event handling is needed). Second, it's more than 4 years passed since 3.2.53 has been published. It's simply too old and just may fail to work with modern servers.
Posted: 04/15/2009 01:11:40
by jacky su (Basic support level)
Joined: 04/13/2009
Posts: 2

Sorry ! .. My C++ Builder5 can not install the latest SecureBlackbox version.
its only for bcb2007,bcb 2009.
How can i get an older version one?

can anyone give me a simple sample about OnAuthenticationKeyboard event for reference.

Many thanks to Innokentiy Ivanov ...
Posted: 04/17/2009 00:25:05
by Ken Ivanov (Team)

We do not officially support BCB 5 and 6 due to numerous bugs in the mentioned products and impossibility to guarantee the correctness of SBB's code generated with them. However, we do have customers who succeeded in using SBB with that development tools.

Instructions on usage of the keyboard-interactive authentication (and other SSH authentication types) are available here.



Topic viewed 2327 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!