Keyboard Interactive Authentification - programmatically using C#

Advertisement

pradeepkhs
Joined:
Posts:
1
Location:
India

Keyboard Interactive Authentification - programmatically using C#

Using the code provided in the link (https://winscp.net/eng/docs/library#csharp), i have have tried to connect to dropbox. Version of the WinSCP DLL that we are using is “5.11.3”.

SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = "odsftp.callidusondemand.com",
PortNumber = 22,
UserName = "adpimdev",
Password = "XXXXXXXXXXXXX",
SshHostKeyFingerprint = "ssh-rsa 1536 89:74:e9:8a:09:ef:17:96:22:1b:e1:2b:af:d0:92:a4"
};

using (Session session = new Session())
{
session.SessionLogPath = @"path to logging file\test.log";
session.Open(sessionOptions);
//Get Ftp File
TransferOptions transferOptions = new TransferOptions();
}
We are getting issue mentioned in the attached log file.
"
. 2018-01-19 18:57:52.276 Server offered these authentication methods: gssapi-with-mic,password,publickey,keyboard-interactive
. 2018-01-19 18:57:52.277 Using SSPI from SECUR32.DLL
. 2018-01-19 18:57:52.277 Attempting GSSAPI authentication
. 2018-01-19 18:57:52.609 GSSAPI authentication request refused
. 2018-01-19 18:57:52.609 Server offered these authentication methods: password,publickey,keyboard-interactive
. 2018-01-19 18:57:52.609 Attempting keyboard-interactive authentication
. 2018-01-19 18:57:52.890 Prompt (keyboard interactive, "SSH server authentication", "Using keyboard-interactive authentication.
. 2018-01-19 18:57:52.890 PAM Authentication", "Password: ")
. 2018-01-19 18:57:52.890 Using stored password.
. 2018-01-19 18:57:53.141 Prompt (keyboard interactive, "SSH server authentication", "Using keyboard-interactive authentication.
. 2018-01-19 18:57:53.141 Password Authentication:", "adpimdev's password: ")
. 2018-01-19 18:57:53.142 Disconnected: Unable to authenticate
"
Description: Log file

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,502
Location:
Prague, Czechia

Re: Keyboard Interactive Authentification - programmatically using C#

Can you authenticate to that server using WinSCP GUI? Or using any other SFTP client?

Reply with quote

Advertisement

You can post new topics in this forum