Skip to content

SFTP Integration #1057

@fabio-marini

Description

@fabio-marini

Overview

Distributed applications may need a way to upload and download files. This hosting and client integration provides that functionality using this Docker image. The public API of the integration supports all the scenarios described in the image page (see examples below).

Usage example

// Add SFTP resource with users as an argument
builder.AddSftp("sftp").WithArgs($"foo:pass:::uploads");

// Add SFTP resource with users as an environment variable
builder.AddSftp("sftp").WithEnvironment("SFTP_USERS", "foo:pass:::uploads");

// same as above, but using encrypted passwords
builder.AddSftp("sftp").WithEnvironment("SFTP_USERS", "foo:$5$t9qxNlrcFqVBNnad$U27ZrjbKNjv4JkRWvi6MjX4x6KXNQGr8NTIySOcDgi4:e:::uploads");

// Add SFTP resource with users in config file
builder.AddSftp("sftp").WithUsersFile("users.conf");

// Add SFTP resource with own host key (prevents MITM warnings)
builder.AddSftp("sftp").WithUsersFile("users.conf").WithHostKeyFile("ssh_host_ed25519_key", KeyType.Ed25519);

// Add SFTP resource with user public key + user will then authenticate 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);

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions