Authentication was partially successful, .. authentication with: 'password,keyboard-interactive'.

0 votes
asked Nov 13 by sree1 (120 points)

Hello Support Team,

I have downloaded the current Trail version of SFTP library and tried to run the below code.

Sftp client = new Sftp();
client.Connect(host, 22);
client.Login(username, password);

I get the below error message mentioned in subject line in the last line of the code. I have username and pwd to connect but not private key. Please suggest how should i process further.

thanks

Applies to: Rebex SFTP

1 Answer

0 votes
answered Nov 14 by Lukas Matyska (47,950 points)

Hello,

Are you able to authenticate to your server using other SFTP client (e.g. FileZilla, WinSCP, Cyberduck, Bitvise SSH) with username and password only?

I mean no private key was involved and the SFTP client did not ask for additional input.

It seems that the server requires keyboard-interactive authentication. If this is the case, you will need to implement advanced keyboard-interactive authentication. But at first, please let us know whether you are able to authenticate with other SFTP client with just username and password without any other interaction.

commented Nov 14 by sree1 (120 points)
we are using SecureFX client to connect server using only username and password. and able to authenticate without any issues.

Regards
commented Nov 14 by Lukas Matyska (47,950 points)
Thank you for the info. So, Rebex should be able to authenticate as well.

To determine what is going on, please create Verbose communication log and post it here, or send it to support@rebex.net for analysis.

It can be created like this:

    var client = new Sftp();
    client.LogWriter = new Rebex.FileLogWriter("c:/data/sftp.log", Rebex.LogLevel.Verbose);
    client.Connect(...);
    client.Login(...);

Please create also second log with only keyboard-interactive enabled. It can be done like this:

    // set SSH session parameters before calling Connect() method
    client.Settings.SshParameters.AuthenticationMethods = SshAuthenticationMethod.KeyboardInteractive;
...