CommunityToolkit.Aspire.Hosting.Sftp
13.4.0
Prefix Reserved
See the version list below for details.
dotnet add package CommunityToolkit.Aspire.Hosting.Sftp --version 13.4.0
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Sftp -Version 13.4.0
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Sftp" Version="13.4.0" />
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Sftp" Version="13.4.0" />
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Sftp" />
paket add CommunityToolkit.Aspire.Hosting.Sftp --version 13.4.0
#r "nuget: CommunityToolkit.Aspire.Hosting.Sftp, 13.4.0"
#:package CommunityToolkit.Aspire.Hosting.Sftp@13.4.0
#addin nuget:?package=CommunityToolkit.Aspire.Hosting.Sftp&version=13.4.0
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Sftp&version=13.4.0
CommunityToolkit.Aspire.Hosting.Sftp
Overview
This Aspire integration is a wrapper for the atmoz SFTP server image.
Usage
The SFTP integration exposes a connection string with the format endpoint=sftp://<host>:<port>.
Example 1: Add SFTP container with users as an argument or environment variable
Define users in (1) command arguments or (2) SFTP_USERS environment variable (syntax: user:pass[:e][:uid[:gid[:dir1[,dir2]...]]], see below for examples)
Add :e behind password to mark it as encrypted. On Windows, use wsl mkpasswd -m sha-512 to generate encrypted passwords.
builder.AddSftp("sftp").WithArgs($"foo:pass:::uploads");
builder.AddSftp("sftp").WithEnvironment("SFTP_USERS", "foo:pass:::uploads");
builder.AddSftp("sftp").WithEnvironment("SFTP_USERS", "foo:$5$t9qxNlrcFqVBNnad$U27ZrjbKNjv4JkRWvi6MjX4x6KXNQGr8NTIySOcDgi4:e:::uploads");
Example 2: Add SFTP container with users in config file
Define users in file mounted as /etc/sftp/users.conf using the WithUsersFile() extension method.
builder.AddSftp("sftp").WithUsersFile("users.conf");
Example 3: Add SFTP container with own host key
This container will generate new SSH host keys at first run. To avoid that your users get a MITM warning when you recreate your container (and the host keys changes), you can mount your own host keys with the WithHostKeyFile() extension method.
builder.AddSftp("sftp").WithUsersFile("users.conf").WithHostKeyFile("ssh_host_ed25519_key", KeyType.Ed25519);
Example 4: Add SFTP container with user public key
Mount public keys in the user's .ssh/keys/ directory using the WithUserKeyFile() extension method. All keys are automatically appended to .ssh/authorized_keys (you can't mount this file directly, because OpenSSH requires limited file permissions). In this example, we do not provide any password, so the user foo can only login with the corresponding private key.
builder.AddSftp("sftp").WithArgs("foo::::uploads").WithUserKeyFile("foo", "id_rsa.pub", KeyType.Rsa);
builder.AddSftp("sftp").WithArgs("foo::::uploads").WithUserKeyFile("foo", "id_ed25519.pub", KeyType.Ed25519);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 is compatible. 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. |
-
net10.0
- Aspire.Hosting (>= 13.4.0)
-
net8.0
- Aspire.Hosting (>= 13.4.0)
-
net9.0
- Aspire.Hosting (>= 13.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 13.4.1-beta.685 | 33 | 7/9/2026 |
| 13.4.1-beta.683 | 41 | 7/9/2026 |
| 13.4.1-beta.680 | 45 | 7/7/2026 |
| 13.4.1-beta.676 | 38 | 7/7/2026 |
| 13.4.1-beta.675 | 48 | 7/6/2026 |
| 13.4.1-beta.674 | 48 | 7/6/2026 |
| 13.4.0 | 791 | 6/2/2026 |
| 13.4.0-beta.671 | 46 | 7/3/2026 |
| 13.4.0-beta.654 | 58 | 6/18/2026 |
| 13.4.0-beta.651 | 62 | 6/17/2026 |
| 13.3.0 | 462 | 5/14/2026 |
| 13.2.1-beta.604 | 59 | 5/14/2026 |
| 13.2.1-beta.532 | 73 | 3/13/2026 |
| 13.2.1-beta.531 | 70 | 3/11/2026 |
| 13.2.1-beta.528 | 66 | 3/5/2026 |
| 13.1.2-beta.518 | 69 | 2/17/2026 |
| 13.1.2-beta.516 | 74 | 2/9/2026 |
| 13.1.2-beta.515 | 72 | 2/2/2026 |
| 13.1.2-beta.514 | 74 | 1/30/2026 |
| 13.1.2-beta.513 | 77 | 1/29/2026 |