0 votes
by (120 points)
edited

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

Applies to: Rebex SFTP
by (70.2k points)
edited

It sounds really weird. Would it be possible to create a communication log (as described at http://www.rebex.net/kb/logging) and mail it to support@rebex.net for analysis?

You can log all successful sessions. When the authentication fails, please send us the whole log (with successful sessions and the failed session) - to compare the differences.

by (120 points)
edited

Yes, we will create this log file and send it to the support. As I have understood the SFTP server is PSFTPD/Windows if this helps. We have also another problem with this machine and the same code. Our program tries to connects to the server and it cannot find any files to download. The same code on a Linux SFTP server works correctly. We are using Rebex SFTP.NET 2.0.3428.0.

1 Answer

0 votes
by (70.2k points)

I have just noticed that you are using three years old version. Can you please try the latest build. There were a lot of improvements and bug fixes which can solve the problem.

...