ApacheMinaSSHD.NET

The best open source .NET SFTP server library — actively maintained, MIT licensed. A C# wrapper around Apache MINA SSHD — the leading open source alternative to commercial SFTP libraries for .NET developers. Embed secure SFTP, SCP, and SSH file transfer in your C# applications with zero Java dependencies. The go-to modern SFTP library for .NET.

⚠️ Security disclaimer: This is a wrapper library around Apache MINA SSHD — it wraps SFTP and SCP only. This is to support a secure transfer in transit by default. It does not implement FTP, FTPS, TFTP, or any other insecure protocol. Like any wrapper library, security depends on how you use it. You are responsible for configuring authentication, encryption algorithms, access controls, and limits appropriately for your environment. See the Security Best Practices guide before deploying to production.

NuGet version MIT license
Install via NuGet View on GitHub

dotnet add package ApacheMinaSSHD.NET.Wrapper

SERALYNX LLC — Critical Infrastructure Engineering

ApacheMinaSSHD.NET is created by SERALYNX LLC, the team behind Porta SFTP Server — the best portable SFTP server for Windows and Linux.

🚀 SERALYNX LLC

We are a Critical Infrastructure Engineering firm supporting Physical and Technological Advancement. We build secure file transfer solutions trusted by civil engineering firms, IT administrators, and developers worldwide.

Porta SFTP Server is our flagship portable SFTP server — a zero-install, instant SFTP server for Windows and Linux that serves critical infrastructure with root jail isolation, FIPS-compliant algorithms, and enterprise-grade security.

ApacheMinaSSHD.NET follows the same architectural paradigm as Porta SFTP Server, exposing the full power of Apache MINA SSHD through a clean .NET API — zero Java dependencies.

Visit Porta SFTP Server

Why .NET Developers Use This

No Java Imports in Your Code

IKVM and Apache MINA SSHD assemblies are bundled inside the NuGet package. Your application code never imports Java, Apache MINA, or SLF4J types directly.

Open Source & MIT

Full source on GitHub. Free for personal, commercial, and enterprise use. Contribute, fork, or customize.

Cross-Platform

Targets .NET 10. Runs on Windows, Linux, and macOS. Deploy as a console app, Windows Service, or Docker container.

Real SSH Compatibility

Tested against OpenSSH and WinSCP clients. Supports SFTP v3, SCP, and standard SSH authentication flows.


Best Open Source .NET SFTP Server Library — Actively Maintained

ApacheMinaSSHD.NET wraps Apache MINA SSHD 2.18.0 through IKVM — zero Java dependencies, no manual setup, just .NET APIs. The leading open source alternative to commercial SFTP libraries — actively maintained, MIT licensed, and production-ready.

Compatible with .NET 6.0, 8.0, 9.0, and 10.0 • Bundles IKVM 8.12.0+

🔒

Password Authentication

Fixed, delegate, and composite password authenticators. Full multi-user support with per-session callbacks.

🔑

Public Key Authentication

Fingerprint-based, directory-backed, and OpenSSH authorized_keys authenticators. Supports Ed25519, RSA, ECDSA.

💡

Keyboard-Interactive & MFA

Challenge-response authentication. Combine password + public key for multi-factor authentication policies.

📁

Virtual File System

Root jail isolation, per-user home directories, hidden-file filtering, path traversal protection, and symlink containment.

📦

SFTP & SCP Subsystems

Full SFTP (file open/close/read/write/create/delete/rename/move) and SCP (upload/download/recursive) server support.

📈

Event Listeners & Monitoring

SFTP lifecycle events, session create/establish/close/disconnect, I/O service events, and proxy metadata inspection.

⚙️

Algorithm Configuration

Choose ciphers (AES-GCM, ChaCha20-Poly1305), MACs (HMAC-SHA2), key exchange (Curve25519, ECDH), and host key algorithms.

Production Defaults

ApplyProductionDefaults and ApplyModernAlgorithmDefaults for conservative security baselines. Configurable timeouts, limits, and banners.

🐉

MIT Licensed

Free for any use — personal, commercial, or enterprise. No restrictions, no hidden fees. Built by SERALYNX LLC.


Build Your First SFTP Server in 5 Minutes

Create a console app, add the NuGet package, and paste this code:

Copy
using ApacheMinaSSHD.NET.Wrapper;
using ApacheMinaSSHD.NET.Wrapper.Factories;

var server = AMNetSshServer.SetUpDefaultServer();
server.Host = "127.0.0.1";
server.Port = 2222;
server.Config.ApplyProductionDefaults();
server.Config.ApplyModernAlgorithmDefaults();

var hostKeys = new AMNetSimpleGeneratorHostKeyProvider("hostkey.ser");
hostKeys.setAlgorithm("RSA");
hostKeys.setKeySize(3072);
server.setKeyPairProvider(hostKeys);

server.SetFixedPasswordAuthenticator("admin", "changeme");
server.setFileSystemFactory(
    new AMNetVirtualFileSystemFactory(@"./sftp-root"));
server.setSubsystemFactories(
    new AMNetSftpSubsystemFactory());

server.Start();
Console.WriteLine("SFTP server running on port 2222");
Console.ReadLine();
server.Stop();

Explore Every Scenario

Ready-to-run C# projects in the repository — from minimal to production-ready.