Error while connecting : Renci.SshNet.Common.SshAuthenticationException: No suitable authentication method found to complete authentication.
We are continuously experiencing the same error for a single user credential of a sftp server hosted in windows azure. Other users can be connected successfully with password authentication mode. Following is the code:
using (SftpClient _sftp = new SftpClient(_host, _username, _password)) { foreach (var d in _sftp.ConnectionInfo.Encryptions.Where(p => p.Key != "aes128-cbc").ToList()) { _sftp.ConnectionInfo.Encryptions.Remove(d.Key); }
try
{
_sftp.Connect();
} catch { //exception occurs.. } }
//exception details:
Error while connecting : Renci.SshNet.Common.SshAuthenticationException: No suitable authentication method found to complete authentication. at Renci.SshNet.ConnectionInfo.Authenticate(Session session) at Renci.SshNet.Session.Connect() at Renci.SshNet.BaseClient.Connect()
Any help from Renci team will be appreciated. It's really critical issue with our client.
I am closing the issue as it was happening due to wrong credentials saved in database.