Class SftpConnectionFactory

Namespace: redb.Route.Sftp
Assembly: redb.Route.Sftp.dll

Named connection factory for SFTP. Register it in the route registry and reference it by name
from the endpoint URI (connectionFactory=my-sftp) so the password, private-key
passphrase and proxy password never have to appear in the URI, and therefore can never reach
logs, telemetry, or the dashboard.

Example:
context.AddToRegistry("partner-sftp", new SftpConnectionFactory
{
Host = "sftp.partner.com", Port = 22, Username = "svc-drop",
PrivateKeyPath = "/etc/redb/keys/partner.pem",
PrivateKeyPassphrase = Environment.GetEnvironmentVariable("SFTP_PASSPHRASE")!
});

r.From("sftp://inbox?connectionFactory=partner-sftp") // no secrets in the route

public sealed class SftpConnectionFactory : RemoteFileConnectionFactory

Inheritance

Object→RemoteFileConnectionFactory→SftpConnectionFactory

Inherited Members

Properties

KnownHostsFile

Path to the known_hosts file.

public string KnownHostsFile { get; set; }

PreferredAuthentications

Preferred authentication methods, comma-separated.

public string PreferredAuthentications { get; set; }

PrivateKeyPassphrase

Passphrase protecting the private key.

public string PrivateKeyPassphrase { get; set; }

PrivateKeyPath

Path to the private key file.

public string PrivateKeyPath { get; set; }

ProxyHost

Proxy host, when connecting through a proxy.

public string ProxyHost { get; set; }

ProxyPassword

Proxy password.

public string ProxyPassword { get; set; }

ProxyPort

Proxy port.

public int ProxyPort { get; set; }

ProxyUsername

Proxy username.

public string ProxyUsername { get; set; }

ServerFingerprint

Expected server host-key fingerprint.

public string ServerFingerprint { get; set; }

StrictHostKeyChecking

Enforce known-hosts checking.

public bool StrictHostKeyChecking { get; set; }