// create a server instance
var server = new FileServer();

// bind SFTP/SSH to port 22
server.Bind(22, FileServerProtocol.Sftp);

// add server key
server.Keys.Add(
  new SshPrivateKey("key.ppk", "password"));

// add a user
server.Users.Add(
  "user01", "password", @"c:\data\user01");

// start server in the background
server.Start();
Show me more code...
SFTP, SCP and SSH server library for C# and VB.NET developers. Provides secure remote file system access over an SSH channel using the SFTP protocol. Makes it easy to create an SFTP server that can be used by Rebex SFTP or any third-party SFTP, SCP or SSH client.

Why Rebex File Server?

SFTP/SCP server

Configuring and launching an SFTP or SCP server sounds like a complicated task. But Rebex File Server makes it simple. All you need to launch a full-featured server can be done in several lines of code. This includes binding to an IP/port, defining users, adding private keys, and more.

SSH shell server

Launch SSH server, use a predefined scp-ready shell or define your own custom commands. Now you are ready to accept SSH connections from users.

SSH port forwarding/tunneling server

Rebex File Server supports outgoing SSH port forwarding, which makes it for client possible to establish TCP tunnels through the SSH server, essentially using it as a proxy.

Custom file systems

Need to compose a virtual file system from multiple directories or access a custom file storage? Use one of the built-in file system providers or implement your own custom file system provider.

Based on open standards

Rebex File Server is based on SSH v2 and SFTP v3/v4, which makes it compatible with a wide range of third-party applications and libraries such as OpenSSH, WinSCP, PuTTY, and many more. As long as the client side speaks SSH, SFTP or SCP, Rebex File Server will happily accept a connection.

Security features

One of the main points of using SFTP is to ensure file transfers are secure and reliable. Rebex File Server provides a rich set of security features. You'll find APIs for verifying client identity and fine-tuning SSH parameters. PKCS8, PuTTY and OpenSSH private key formats are supported. You can easily generate a key pair for SSH authentication as well. Even private keys stored on smart cards are supported.

Try it online

Need to make sure that your SFTP, SCP or SSH client works flawlessly with Rebex File Server? Just connect to test.rebex.net:22 (username: demo password: password) and give it a try - browse the directories and downloading some files (or let us know if you would like to try uploading as well).

You can also try to download the Rebex Free Tiny SFTP Server - a minimalist SFTP server Windows application based on this component.

Easy-to-use API

The whole server API is lightweight. Need to manage a server, authenticate virtual users against your user database, or implement a shell command? It's easy and hassle-free.

Platforms

.NET Framework

2.0-4.8

.NET Core

1.x, 2.x, 3.0

Mono

4.x, 5.x

Xamarin.iOS

Xamarin.iOS 10.3 or later

Xamarin.Android

Xamarin.Android 8.0 or later

Legacy platforms

.NET Compact Framework

3.5, 3.9

Learn more about supported standards and platforms.

Featured samples

View all 4 C# and VB.NET samples

Satisfied clients

I recently purchased your Secure Server pack so I could integrate SFTP server functionality into a cross-platform remote support package we use to support our customers, and so far have found it to be an excellent solution with an easy to use API and great cross-platform support - great work!

David Eagles

CTO, iVolve