Hello,
we are using Rebex SFTP component 2.0.3428.0
From time to time we are getting authenication errors like this:
ERROR: An Exception has occured while trying to connect: Authentication method not supported. Supported methods: ''.
at Rebex.Net.Sftp.Login(String userName, String password, SshPrivateKey privateKey)
...
Our code to connect is:
mobjSftp = new Sftp();
mobjSftp.Connect(mobjConnectionData.strSFtpServer);
SftpConnectionState cs = mobjSftp.GetConnectionState();
if (cs.Connected)
{
switch (mobjConnectionData.eSFtpAccessType)
{
case clsConfiguration.clsThread.EFtpAccessType.Password:
mobjSftp.Login(mobjConnectionData.strSFtpUserName, mobjConnectionData.strSFtpPassword);
break;
case clsConfiguration.clsThread.EFtpAccessType.PrivateKey:
SshPrivateKey privateKey = new Rebex.Net.SshPrivateKey(mobjConnectionData.strSFtpPrivateKeyFile, "");
mobjSftp.Login(mobjConnectionData.strSFtpUserName, privateKey);
break;
default:
throw new Exception("Invalid Ftp Access Type passed!");
}
...
What can the problem be? Is this a problem of the SFTP client?
Thanks for your answers,
Thomas