Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Keyboard Interactive Authentification - programmatically using C#

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

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
"