cURL / Mailing Lists / curl-library / Single Mail


Re: The FTP problem that turns out to be SFTP

From: Michael Lam <>
Date: Thu, 5 Jan 2012 15:08:03 -0500

>Your screenshot shows that your issue isn't about FTP at all. Is it SFTP? Then
we need to know more details that isn't shown there.

Yes this is an SFTP problem.

>Can you please provide a short stand-alone source code example that repeats
the bug? What libssh2 version are you using? I assume this is running on

The libssh2 version is 1.2.5 IDN-Windows-native libssh2. We are using c# to call the cURL exe by starting a process and pass in arguments in the same manner as a command line prompt:

     fileName = "c:\temp\MyFile.txt"; // name of file to be transferred
     string argument = string.Empty;
           argument =
        @"-v -u {0}: --key ""{1}"" --pubkey ""{2}"" -T ""{3}"" ""{4}"" --insecure",
        ftpsAdapterConfiguration.User, ftpsAdapterConfiguration.AuthenticationKeyPath, ftpsAdapterConfiguration.EncryptionKeyPath, fileName,

     ProcessStartInfo startInfo = new ProcessStartInfo
      Arguments = argument,
      RedirectStandardError = true,
      UseShellExecute = false,
      FileName = exePath // curl.exe's path
     Process myProcess = new Process { StartInfo = startInfo };

      myProcess.Start(); // run cURL exe
      // Synchronous processing
      int exitCode = myProcess.ExitCode;
      // Checks for error code

       string output = myProcess.StandardError.ReadToEnd();
       output = string.Format("Ftp process failed for File '{0}'. ErrorDetails='{1}'. Retry: '{2}'", fileName,
               output, retry);
List admin:
Received on 2012-01-05