EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Authentication Failure (D2005)

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#21155
Posted: 08/23/2012 14:11:52
by Harish Desai (Basic support level)
Joined: 08/23/2012
Posts: 3

I am using Public Key Authentication to make a SSH connection, i am able to successfully connect using putty or any other client application. But when i use the sample SyncClient app and set the required params i get Error code 114 ERROR_SSH_NO_MORE_AUTH_METHODS_AVAILABLE error. The private key is successfully loaded in tomemory storage

Here is modified code for connect button click,
Code
Client.AuthenticationTypes := SSH_AUTH_TYPE_PUBLICKEY;

    KeyStorage.Clear;
    Key := TElSSHKey.Create;
   if  (Key.LoadPublicKey(Edit6.Text)=0) then
     Memo2.Lines.Add('Private Key Loaded');
    KeyStorage.Add(Key);
    //Client.AuthenticationTypes :=  SSH_AUTH_TYPE_PUBLICKEY;

   { if (Edit6.Text <> '') and (Key.LoadPrivateKey(Edit6.Text) = 0) then
    begin

      Client.AuthenticationTypes := Client.AuthenticationTypes or SSH_AUTH_TYPE_PUBLICKEY;
    end
    else
      Client.AuthenticationTypes := Client.AuthenticationTypes and not SSH_AUTH_TYPE_PUBLICKEY; }
    Key.Free;
#21156
Posted: 08/23/2012 14:31:41
by Eugene Mayevski (EldoS Corp.)

Code
if  (Key.LoadPublicKey(Edit6.Text)=0) then
     Memo2.Lines.Add('Private Key Loaded');


Does it sound ok for you? Hint: the message lies.


Sincerely yours
Eugene Mayevski
#21157
Posted: 08/23/2012 14:37:40
by Eugene Mayevski (EldoS Corp.)

To make it clear: despite the misleading authentication method name (we didn't invent it, frankly) you authenticate with a *private* key, not a public key. Consequently you need to load a private key for authenticating.


Sincerely yours
Eugene Mayevski
#21158
Posted: 08/23/2012 15:14:40
by Harish Desai (Basic support level)
Joined: 08/23/2012
Posts: 3

I was trying out different options and didn't change the memo line, i was loading the private keys and then tried with public keys.

Should i load both public and private key in the key storage?

[Modifed message]
Thanks Eugene, after loading both the keys it worked.

Also i do have a question, i was going through your earlier post where you said SCP is not supported, is there any way i can implement it? We have been using SFTP and recent changes makes us to move to SCP.
#21161
Posted: 08/23/2012 23:28:52
by Eugene Mayevski (EldoS Corp.)

I can hardly see what changes can make you move to the protocol, which is outdated and which has been replaced by SFTP.


Sincerely yours
Eugene Mayevski
#21175
Posted: 08/24/2012 08:10:17
by Harish Desai (Basic support level)
Joined: 08/23/2012
Posts: 3

I do understand SFTP is way to go.

The confusion and the reason to go with SCP is that we think SFTP requires FTP servers to be enabled, but i was able to successfully upload the files with FTP server being disabled.

1) Does SFTP require FTP Server?
2) I do know that you can disable SFTP on servers, in which case is there any fallback option
#21178
Posted: 08/24/2012 09:14:55
by Ken Ivanov (EldoS Corp.)

Harish,

SFTP transfers require SFTP server software to be running on server side (not FTP server software).

SCP is an insecure protocol, so I doubt it is a good fallback option for the case where SFTP server is switched off. In fact, on Unix machines there is a way to set up SFTP connection through an SSH shell even if SFTP module is switched off.
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

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