I am able to login to SFTP server through WINSCP client but not able to do programmatically using rebex .net libraries.
I used the sample code shared on your portal ,copying again below.
Its throwing authentication error after providing password itself which is otherwise going through WinScp Client.
Error from logs:
ERROR Sftp(1)[1] SSH: Rebex.Net.SshException: Supplied credentials not accepted by the server
var sftp = new Sftp();
sftp.Connect(hostname);
// register AuthenticationRequest event handler
sftp.AuthenticationRequest += client_AuthenticationRequest;
// log in (alternatively, omit username and password as well)
sftp.Login(username, password);
void client_AuthenticationRequest(object sender, SshAuthenticationRequestEventArgs e)
{
Console.WriteLine("Server: {0}", e.Name);
Console.WriteLine("Instructions: {0}", e.Instructions);
foreach (SshAuthenticationRequestItem item in e.Items)
{
// display question
Console.Write(item.Prompt);
// set answer
item.Response = Console.ReadLine();
}
}