locked
SFTP Free component developed in C# RRS feed

  • Question

  •  

    guys!

     

    i want to upload/download files from SSH server using SFTP. can anyone tell me Is there any free component available for SFTP?

     

    thanks

    jbasingh

     

     

    Monday, August 20, 2007 8:44 AM

All replies

  • Hi,

     

    Please let me know when you have the FREE sftp component.

     

     

    Thanks,

    Tan

     

    Monday, February 25, 2008 9:14 PM
  • That is slightly disingenuous. You may freely download a trial but the product is not free.
    Nigel Ainscoe
    Thursday, March 25, 2010 9:20 AM
  • J,

    SharpSSH and Granados are free.  Search for them on Google.

    FYI, I just developed a commercial .NET SFTP Component.  Here is the link:

    http://www.kellermansoftware.com/p-41-net-sftp-library.aspx

    Thanks.

    Greg

    Friday, April 23, 2010 1:46 AM
  • Hi

    Unless I missed something looking at the examples for SharpSSH, the put does not support directory targets and there is no CWD implementation to allow destination folder changes?

    Also looking for a free to use SSH component.

    Thanks

    Wednesday, April 13, 2011 2:25 PM
  • You might want to check this library : http://sshnet.codeplex.com/

     

     


    Sunday, June 12, 2011 4:22 AM
  • SFTP doesn't have a concept of current directory, that's why you don't see implementation of CWD. You specify the absolute path when uploading or downloading the file (or performing other operation).
    Saturday, July 9, 2011 3:16 PM
  •  

    guys!

     

    i want to upload/download files from SSH server using SFTP. can anyone tell me Is there any free component available for SFTP?

     

    thanks

    jbasingh

     

     

    SharpSSH is one of the free libs. If you are looking for a stable library, you may consider using a third-party component like our Ultimate SFTP component.
    Monday, August 6, 2012 9:51 AM
  • For information, I ended up using WINSCP and shelling out to perform the actual SFTP operation.

    I created an input file for the WINSCP process with all the options I wanted;

                    StreamWriter sw = new StreamWriter(curDir + @"\" + "transferBatch.txt");
                    sw.WriteLine("option batch abort");                                     // Abort on error
                    sw.WriteLine("option confirm off");                                     // Allow auto overwrites
                    sw.WriteLine("option transfer binary");                                 // Binary transfers
                    sw.WriteLine(openCommand);
                    sw.WriteLine("cd " + Properties.Settings.Default.FTPremotedir);         // sftp to change to target directory from login dir
                    sw.WriteLine("put " + detailFile);                                          // Put detail file to server
                    sw.WriteLine("put " + manifestFile);                                        // Put manifest file to server
                    sw.WriteLine("exit");                                                   
                    sw.Close();

    I then setup up the FTP process;

                ftpProcess = new Process();
                procInfo = new ProcessStartInfo();
                procInfo.UseShellExecute = false;
                procInfo.WorkingDirectory = curDir;
                procInfo.FileName = "winSCP.com";
                procInfo.CreateNoWindow = true;
                procInfo.RedirectStandardOutput = true;
                
                appargs = "/log=TransferLog.xml /script=transferBatch.txt";
                procInfo.Arguments = appargs;
                procInfo.WindowStyle = ProcessWindowStyle.Hidden;

    and finally started the process.

                    ftpProcess.StartInfo = procInfo;
                    ftpProcess.Start();
                    ftpoutput = ftpProcess.StandardOutput.ReadToEnd();
                    ftpProcess.WaitForExit();

    Not the most eligant solution but works and used free SFTP tools. Would much prefer to use a .NET component but time and costs prevented that!

    Monday, August 6, 2012 10:27 AM