Intro
SFTP Server Lite is an experimental .NET SFTP server library that is extremely simple to use.
It can be used to easily add SFTP server capabilities to your .NET application, no matter whether you use C#, VB.NET or any other .NET language.
Check out the sample code to see how it works and what it can do! If you have any questions, just ask me: lukas@nuane.com.

News
This project has been acquired by Rebex and a greatly improved version is now available as Rebex File Server component for .NET, .NET CF, Xamarin.iOS and Xamarin.Android.

Downloads
sftps-lite-0.8.0.4-bin.zip - SFTP Server Lite v0.8 binaries and samples

Sample code

using System;

using System.Collections.Generic;

using System.Text;

using System.Net;

using Nuane.Net;

         

namespace Nuane.Samples

{

      class Program

      {

            static void Main(string[] args)

            {
                  SshKey rsaKey = SshKey.Generate(SshKeyAlgorithm.RSA, 1024);
                  SshKey dssKey = SshKey.Generate(SshKeyAlgorithm.DSS, 1024);
         

                  // add keys, bindings and users
                  SftpServer server = new SftpServer();

                  server.Log = Console.Out;

                  server.Keys.Add(rsaKey);

                  server.Keys.Add(dssKey);

                  server.Bindings.Add(IPAddress.Any, 22);

                  server.Users.Add(new SshUser("user01", "some-password", @"c:\data\user01"));

                  server.Users.Add(new SshUser("user02", "another-password", @"c:\data\user02"));

                  // start the server                                                    
                 
server.Start();

                  Console.WriteLine("Press any key to stop the server.");

                  Console.ReadKey();


                  // stop the server
                                                                       

                  server.Stop();

         

            }

      }

}


History
2011-01-24 v0.8.0.4
- added experimental support for Windows user authentication
- added LogLevel property to SftpServer class

2011-01-21 v0.8.0.3
- added exprimental shell support

2011-01-19 v0.8.0.2
- fixed a bug that caused an internal error to be reported if the client used an unsupported ciphers

2010-12-26 v0.8.0.1
- ability to specify multiple user accounts
- virtual home directory support
- key generation support

2010-12-01 v0.8.0.0
- the first public release


License
In binary form, SFTP Server Lite is free for both commercial and non-commercial use.

About the author
My name is Lukas Pokorny and I have been developing .NET components at Rebex since 2002.