No message or timeout while trying to connect to sftp server

I am trying to connect to the sftp server and I am not getting any exception or timeout, only increasing memory usage.

I am using the EnterpriseDT.Net.Ftp library

My code looks like this:

XmlConfigurator.Configure();
      Module1.Logger = LogManager.GetLogger("SftpTester");
      try
      {
        Module1.Logger.Info((object) "[EnterpriseDT] - Start");
        Uri uri1 = new Uri("ftp://*****");
        // ISSUE: explicit reference operation
        // ISSUE: variable of a reference type
        Uri& uri2 = @uri1;
        int port = ****;
        string str1 = "******";
        // ISSUE: explicit reference operation
        // ISSUE: variable of a reference type
        string& UserName = @str1;
        string str2 = "*******";
        // ISSUE: explicit reference operation
        // ISSUE: variable of a reference type
        string& Password = @str2;
        SecureFTPConnection secureFtpConnection = Module1.InitConnection(uri2, port, UserName, Password);
        Module1.Logger.Info((object) "Connecting to ftp...");
        secureFtpConnection.Connect();
        Module1.Logger.Info((object) "Connection Successful!!!");
        try
        {
          Module1.Logger.Info((object) "Disposing connection...");
          secureFtpConnection.Dispose();
        }
        catch (Exception ex)
        {
          ProjectData.SetProjectError(ex);
          ProjectData.ClearProjectError();
        }
        Module1.Logger.Info((object) "Connection Disposed.");
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        Exception exception = ex;
        Module1.Logger.Error((object) ("Main() - " + exception.Message));
        Module1.Logger.Error((object) ("StackTrace: " + exception.StackTrace));
        if (exception.InnerException != null)
          Module1.Logger.Error((object) ("InnerException: " + exception.InnerException.Message));
        ProjectData.ClearProjectError();
      }
      finally
      {
        Module1.Logger.Info((object) "[EnterpriseDT] - End");
      }

  private static SecureFTPConnection InitConnection(ref Uri uri, int port, ref string UserName = "", ref string Password = "")
    {
      Module1.Logger.Info((object) "InitConnection() - Setting Up Connection");
      SecureFTPConnection secureFtpConnection = new SecureFTPConnection();
      secureFtpConnection.LicenseOwner = "*******";
      secureFtpConnection.LicenseKey = "***********";
      secureFtpConnection.ServerAddress = uri.Host;
      Module1.Logger.Info((object) ("\tHost: " + uri.Host));
      secureFtpConnection.UserName = UserName;
      Module1.Logger.Info((object) ("\tUsername: " + UserName));
      secureFtpConnection.Protocol = FileTransferProtocol.SFTP;
      Module1.Logger.Info((object) ("\tProtocol: " + FileTransferProtocol.SFTP.ToString()));
      secureFtpConnection.ServerValidation = SecureFTPServerValidationType.None;
      Module1.Logger.Info((object) ("\tServerValidation: " + SecureFTPServerValidationType.None.ToString()));
      secureFtpConnection.AuthenticationMethod = AuthenticationType.Password;
      Module1.Logger.Info((object) ("\tAuthenticationMethod: " + AuthenticationType.Password.ToString()));
      if (port > 0)
      {
        secureFtpConnection.ServerPort = port;
        Module1.Logger.Info((object) ("\tServerPort: " + port.ToString()));
      }
      secureFtpConnection.Password = Password;
      Module1.Logger.Info((object) ("\tPassword: " + Password));
      return secureFtpConnection;
    }

Log message:

2014-09-27 04:50:22,783 [1] - [SftpTester] [EnterpriseDT] - Start
2014-09-27 04:50:22,799 [1] - [SftpTester] InitConnection() - Setting Up Connection
2014-09-27 04:50:22,971 [1] - [SftpTester] Host: *******
2014-09-27 04:50:22,971 [1] - [SftpTester] Username: *****
2014-09-27 04:50:22,971 [1] - [SftpTester] Protocol: SFTP
2014-09-27 04:50:22,971 [1] - [SftpTester] ServerValidation: None
2014-09-27 04:50:22,971 [1] - [SftpTester] AuthenticationMethod: Password
2014-09-27 04:50:22,971 [1] - [SftpTester] ServerPort: ****
2014-09-27 04:50:22,971 [1] - [SftpTester] Password: ******
2014-09-27 04:50:22,971 [1] - [SftpTester] Connecting to ftp...

Any idea if this is a timeout error or am I blacklisted?

Update 10/07/2014

Sequence for the server:

  • Password authentication
  • Waiting for package
  • Package arrived
  • Partial success. Try: password, public, interactive keyboard.
  • Keyboard Interactive Authentication
  • Waiting for package
  • Package arrived
  • Request: Password:
  • Waiting for package
  • Package arrived
  • Partial success. Try: password, public, interactive keyboard.
  • Waiting for package
  • Package arrived
  • Request: Password:
  • Loop (9 to 15)

Update

Updating the library to solve the problem was a mistake.

8.6.1 (23 2014 )
​​ kbi, . ​​ SFTP, . ​​ SFTP, SFTP- OpenVMS SSH. ​​ , . ​​ " " 2012 R2 FTPS.

+4
1

. . , , Debug , FTP-.

Debug :

EnterpriseDT.Util.Debug.Logger.CurrentLevel = EnterpriseDT.Util.Debug.Level.DEBUG;

. appender (, db ..), . Debug .

, -?

. - , 120000 . - , , . , .

Am ?

, , FTP-.

-?

FTP- . EnterpriseDT.Net.Ftp FTP- , FTP-. FTP- , .

FTP- , FTP-. FileZilla , , . FTP-.

Update:

, , Auth. , SSH- , .

, SFTP- :

Try: password, publickey, keyboard-interactive

( ) ( ?), SSH, SFTP , .

, SSHAuthPrompt KBIPrompts SecureFTPConnection:

http://www.enterprisedt.com/products/edtftpnetpro/doc/manual/api/html/T_EnterpriseDT_Net_Ftp_Ssh_SSHAuthPrompt.htm

. , KBI, 'Password:', .

AuthenticationMode KeyboardInteractive.

+1

All Articles