# SftpHostingExtensions

- Kind: `class`
- Package: [CommunityToolkit.Aspire.Hosting.Sftp](/reference/api/csharp/communitytoolkit.aspire.hosting.sftp.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.Sftp/SftpHostingExtensions.cs)

Provides extension methods for adding an SFTP resource to an `Hosting.IDistributedApplicationBuilder`.

## Definition

```csharp
namespace Aspire.Hosting;

public static class SftpHostingExtensions
{
    // ...
}
```

## Methods

- [AddSftp(IDistributedApplicationBuilder, string, int?)](/reference/api/csharp/communitytoolkit.aspire.hosting.sftp/sftphostingextensions/methods.md#addsftp-idistributedapplicationbuilder-string-int) : `IResourceBuilder<SftpContainerResource>` `extension` `ats export` -- Adds atmoz SFTP to the application model.
- [WithHostKeyFile(IResourceBuilder<SftpContainerResource>, string, KeyType)](/reference/api/csharp/communitytoolkit.aspire.hosting.sftp/sftphostingextensions/methods.md#withhostkeyfile-iresourcebuilder-sftpcontainerresource-string-keytype) : `IResourceBuilder<SftpContainerResource>` `extension` `ats export` -- Adds a bind mount for the specified host key file to an SFTP container resource.
- [WithUserKeyFile(IResourceBuilder<SftpContainerResource>, string, string, KeyType)](/reference/api/csharp/communitytoolkit.aspire.hosting.sftp/sftphostingextensions/methods.md#withuserkeyfile-iresourcebuilder-sftpcontainerresource-string-string-keytype) : `IResourceBuilder<SftpContainerResource>` `extension` `ats export` -- Adds a bind mount for the public key file of the specified user to an SFTP container resource.
- [WithUsersFile(IResourceBuilder<SftpContainerResource>, string)](/reference/api/csharp/communitytoolkit.aspire.hosting.sftp/sftphostingextensions/methods.md#withusersfile-iresourcebuilder-sftpcontainerresource-string) : `IResourceBuilder<SftpContainerResource>` `extension` `ats export` -- Adds a bind mount for the users.conf file to an SFTP container resource.
