EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTP connection error

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#13967
Posted: 07/20/2010 19:35:22
by Kellie Kvarfordt (Standard support level)
Joined: 01/11/2010
Posts: 1

I am using Delphi 2010 VCL with Indy 10.1.1 installed. I am using TElIdSFTPClient (from SecureBlackBlackbox 8 SBIdSFTP) to connect to a secure FTP site (that is a Windows 2007 64 bit server).

When I run my program from my own machine (the one I built the exe with), it connects to the server fine. When I run the program from another machine, my log file says:

Connect attempt failed - Connection error (No connection established.)

and a popup message says I/0 Error 105. I found a 105 error for SSH that says

ERROR_SSH_INVALID_MAC 105 (0x0069) Received packet has invalid MAC.

I don't really understand the relationship between SFTP and SSH, so I don't know if this is the right error description. There is no error code listed for SFTP 105.

If I use the same account to log into the same server using WinSCP, I can connect from a different machine. So it doesn't seem that my MAC address is part of the user account.

Can you give me advice on how to fix or troubleshoot this issue?

My code looks like this:

Code
try
    idSFTP1.Versions := [sbSFTP0, sbSFTP1, sbSFTP2, sbSFTP3,
                         sbSFTP4, sbSFTP5, sbSFTP6];

    idSFTP1.Host := hostName;
    idSFTP1.Port := 22;
    idSFTP1.Username := userName;
    idSFTP1.Password := pwd;

    idSFTP1.Connect;
    idSFTP1.TransferType := ftASCII;

  except
    on E: Exception do
             begin
               msg := 'Connect attempt failed - '  + E.Message;
               WriteLn(logFile, msg);
               Result := False;
             end;
    else
      begin
        msg := 'Connect attempt failed';
        WriteLn(logFile, msg);
        Result := False;
      end;
  end;
#13970
Posted: 07/21/2010 02:46:12
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

Hi. I/O Error 105 is also Windows I/O error, which is 'File not open for output'.
Please check, on which line exception is thrown, and see if everything is ok whith files you are opening.
SFTP is connected to SSH very closely, since SFTP is a file access protocol over SSH connection.

Reply

Statistics

Topic viewed 2552 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!