SSH.NET 2025.1.0 (original) (raw)

SSH.NET is a Secure Shell (SSH-2) library for .NET, optimized for parallelism.

Version NuGet download count Build status

Key Features

How to Use

Run a command

using (var client = new SshClient("sftp.foo.com", "guest", new PrivateKeyFile("path/to/my/key")))
{
    client.Connect();
    using SshCommand cmd = client.RunCommand("echo 'Hello World!'");
    Console.WriteLine(cmd.Result); // "Hello World!\n"
}

Upload and list files using SFTP

using (var client = new SftpClient("sftp.foo.com", "guest", "pwd"))
{
    client.Connect();

    using (FileStream fs = File.OpenRead(@"C:\tmp\test-file.txt"))
    {
        client.UploadFile(fs, "/home/guest/test-file.txt");
    }

    foreach (ISftpFile file in client.ListDirectory("/home/guest/"))
    {
        Console.WriteLine($"{file.FullName} {file.LastWriteTime}");
    }
}

Main Types

The main types provided by this library are:

Additional Documentation

Encryption Methods

SSH.NET supports the following encryption methods:

Key Exchange Methods

SSH.NET supports the following key exchange methods:

Public Key Authentication

SSH.NET supports the following private key formats:

Private keys in OpenSSL traditional PEM format can be encrypted using one of the following cipher methods:

Private keys in OpenSSL PKCS#8 PEM format can be encrypted using any cipher method BouncyCastle supports.

Private keys in ssh.com format can be encrypted using the following cipher method:

Private keys in OpenSSH key format can be encrypted using one of the following cipher methods:

Private keys in PuTTY private key format can be encrypted using the following cipher method:

Host Key Algorithms

SSH.NET supports the following host key algorithms:

OpenSSH certificate authentication is supported for all of the above, e.g. ssh-ed25519-cert-v01@openssh.com.

Message Authentication Code

SSH.NET supports the following MAC algorithms:

Compression

SSH.NET supports the following compression algorithms:

Framework Support

SSH.NET supports the following target frameworks:

Building the library

The library has no special requirements to build, other than an up-to-date .NET SDK. See also CONTRIBUTING.md.

Using Pre-Release NuGet Packages

Pre-release NuGet packages are published from the develop branch to the GitHub NuGet Registry. In order to pull packages from the registry, create a Personal Access Token with the read:packages permissions. Then add a package source for SSH.NET:

dotnet nuget add source --name SSH.NET --username <username> --password <personalaccesstoken> https://nuget.pkg.github.com/sshnet/index.json

Note: you may have to add --store-password-in-clear-text on non-Windows platforms.

Then you can add the the package as described here.

Supporting SSH.NET

Do you or your company rely on SSH.NET in your projects? If you want to encourage us to keep on going and show us that you appreciate our work, please consider becoming a sponsor through GitHub Sponsors.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed.
.NET Core netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed.
.NET Standard netstandard2.0 is compatible. netstandard2.1 was computed.
.NET Framework net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed.
MonoAndroid monoandroid was computed.
MonoMac monomac was computed.
MonoTouch monotouch was computed.
Tizen tizen40 was computed. tizen60 was computed.
Xamarin.iOS xamarinios was computed.
Xamarin.Mac xamarinmac was computed.
Xamarin.TVOS xamarintvos was computed.
Xamarin.WatchOS xamarinwatchos was computed.

NuGet packages (438)

Showing the top 5 NuGet packages that depend on SSH.NET:

Package Downloads
Testcontainers Testcontainers for .NET is a library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions. 85.5M
Renci.SshNet.Async Extends Renci.SshNet to implement the task-based async pattern 11.6M
AspNetCore.HealthChecks.Network HealthChecks.Network is the health check package for network services. 10.2M
MongoDBMigrations MongoDbMigrations uses the official MongoDB C# Driver to migrate your documents in your mongo database via useful fluent API. Supports up and down migrations with cancelation and progress handling. Also, this library is able to check a schema of collections in your database during the migration run. This version supports on-premise Mongo database either Azure CosmosDB (with Mongo-like API) or even AWS DocumentDB. In addition you can use TLS and/or SHH tunnels in your migrations. PS1 script for integration with CI/CD pipelines provides inside of the repository 1.6M
BoldReports.Net.Core Syncfusion Bold Reports for ASP.NET Core is a server-side helper package used to build ASP.NET Core Web API services. Key features: • Users can interactively provide report parameter inputs at run time to display reports based on the parameter. • SQL Server RDL specification expressions are supported. • Built-in SQL Query designer with a convenient user interface to create and view relationships between tables easily. • A rich selection of built-in report items, including charts, grids, pivot grids, subreports, textboxes, images, lines, and rectangles for better visual representation of data. • Report viewer supports multilevel grouping and sorting in data regions of report items such as tablixes, matrices and lists. • Interactive features in RDL specification like drill through, hyperlink, and interactive sorting to work with report at runtime. • Preview the report in print layout prior to printing. Page settings can be modified using page setup dialog. • All static texts within the report viewer and report designer can be localized to any desired language. • Displayed reports can be exported to popular file formats: PDF, Word, Excel, and HTML. Learn more: https://www.boldreports.com/features?utm\_source=nuget&utm\_medium=listing Documentation: https://help.boldreports.com/embedded-reporting/aspnet-core-reporting?utm\_source=nuget&utm\_medium=listing Support Questions: mailto:support@boldreports.com?utm_source=nuget&utm_medium=listing This is a commercial product and requires a paid subscription license for possession or use. Syncfusion’s Bold Reports services, including this component, is subject to the terms and conditions of Syncfusion's Bold Reports Software License Agreement and Terms of Service (https://www.boldreports.com/terms-of-use/?utm\_source=nuget&utm\_medium=listing). To acquire a license, you can start a subscription or start a free 15-day trial here (https://www.boldreports.com/pricing/?utm\_source=nuget&utm\_medium=listing). This server-side helper package provides services to the following components and libraries: • ASP.NET Core Report Viewer: https://www.boldreports.com/embedded-reporting/aspnet-core-report-viewer?utm\_source=nuget&utm\_medium=listing • ASP.NET Core Report Designer: https://www.boldreports.com/embedded-reporting/aspnet-core-report-designer?utm\_source=nuget&utm\_medium=listing • ASP.NET Core Report Writer: https://www.boldreports.com/embedded-reporting/aspnet-core-report-writer?utm\_source=nuget&utm\_medium=listing • Blazor Report Viewer: https://www.boldreports.com/embedded-reporting/blazor-report-viewer?utm\_source=nuget&utm\_medium=listing • Blazor Report Designer: https://www.boldreports.com/embedded-reporting/blazor-report-designer?utm\_source=nuget&utm\_medium=listing • Angular Report Viewer: https://www.boldreports.com/embedded-reporting/angular-report-viewer?utm\_source=nuget&utm\_medium=listing • Angular Report Designer: https://www.boldreports.com/embedded-reporting/angular-report-designer?utm\_source=nuget&utm\_medium=listing • JavaScript Report Viewer: https://www.boldreports.com/embedded-reporting/javascript-report-viewer?utm\_source=nuget&utm\_medium=listing • JavaScript Report Designer: https://www.boldreports.com/embedded-reporting/javascript-report-designer?utm\_source=nuget&utm\_medium=listing © Copyright 2026 Syncfusion, Inc. All Rights Reserved. The Syncfusion Bold Reports license and copyright applies to this distribution. 1.5M

GitHub repositories (92)

Showing the top 20 popular GitHub repositories that depend on SSH.NET:

Repository Stars
ShareX/ShareX ShareX is a free and open-source application that enables users to capture or record any area of their screen with a single keystroke. It also supports uploading images, text, and various file types to a wide range of destinations. 38.1K
duplicati/duplicati Store securely encrypted backups in the cloud! 14.7K
mRemoteNG/mRemoteNG mRemoteNG is the next generation of mRemote, open source, tabbed, multi-protocol, remote connections manager. 10.9K
stride3d/stride Stride (formerly Xenko), a free and open-source cross-platform C# game engine. 7.6K
btcpayserver/btcpayserver Accept Bitcoin payments. Free, open-source & self-hosted, Bitcoin payment processor. 7.6K
1Remote/1Remote One Remote Access Manager to Rule Them All 6.0K
win-acme/win-acme Automate SSL/TLS certificates on Windows with ease 5.7K
proxysu/ProxySU Xray,V2ray,Trojan,NaiveProxy, Trojan-Go, ShadowsocksR(SSR),Shadowsocks-libev及相关插件,MTProto+TLS 一键安装工具,windows下用(一键科学上网) 5.7K
Xabaril/AspNetCore.Diagnostics.HealthChecks Enterprise HealthChecks for ASP.NET Core Diagnostics Package 4.4K
testcontainers/testcontainers-dotnet A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions. 4.3K
cyanfish/naps2 Scan documents to PDF and more, as simply as possible. 4.3K
Justsenger/ExHyperV The Excalibur of Hyper-V / Hyper-V 神器 4.2K
ONLYOFFICE/CommunityServer Free open source office suite with business productivity tools: document and project management, CRM, mail aggregator. 3.1K
shrimqy/Sefirah Phone Link / KDE Connect alternative 2.5K
openbullet/OpenBullet2 OpenBullet reinvented 2.3K
ArduPilot/MissionPlanner Mission Planner Ground Control Station for ArduPilot (c# .net) 2.3K
jimradford/superputty The SuperPuTTY Window Manager for putty sessions 2.0K
myrtille-rdp/myrtille A native HTML4 / HTML5 Remote Desktop Protocol and SSH client 2.0K
ariacom/Seal-Report Database Reporting Tool and Tasks (.Net) 1.6K
LogExperts/LogExpert Windows tail program and log file analyzer. 1.2K

Include prerelease

Include vulnerable

Include deprecated

Version Downloads Last Updated
2025.1.0 20,634,514 10/27/2025
2025.0.0 7,967,684 4/18/2025
2024.2.0 35,734,736 11/12/2024
2024.1.0 19,569,043 7/1/2024
2024.0.0 12,389,250 2/21/2024
2023.0.1 3,959,509 12/29/2023
2023.0.0 37,029,366 10/10/2023
2020.0.2 48,431,607 5/29/2022
2020.0.1 25,265,151 1/24/2021 2020.0.1 has at least one vulnerability with moderate severity.
2020.0.0 2,360,645 12/31/2020 2020.0.0 has at least one vulnerability with moderate severity.
2020.0.0-beta1 4,120,492 6/7/2020 2020.0.0-beta1 has at least one vulnerability with moderate severity.
2016.1.0 57,614,076 10/16/2017 2016.1.0 has at least one vulnerability with moderate severity.
2016.1.0-beta4 5,430 10/7/2017 2016.1.0-beta4 has at least one vulnerability with moderate severity.
2016.1.0-beta3 41,025 9/20/2017 2016.1.0-beta3 has at least one vulnerability with moderate severity.
2016.1.0-beta2 74,991 8/16/2017 2016.1.0-beta2 has at least one vulnerability with moderate severity.
2016.1.0-beta1 149,135 12/14/2016 2016.1.0-beta1 has at least one vulnerability with moderate severity.
2016.0.0 7,009,617 8/2/2016 2016.0.0 has at least one vulnerability with moderate severity.
2016.0.0-beta3 5,645 7/27/2016 2016.0.0-beta3 has at least one vulnerability with moderate severity.
2016.0.0-beta2 22,364 6/25/2016 2016.0.0-beta2 has at least one vulnerability with moderate severity.
2016.0.0-beta1 5,616 6/19/2016 2016.0.0-beta1 has at least one vulnerability with moderate severity.