Class SftpConnectionFactory
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
Inherited Members
Properties
PreferredAuthentications
Preferred authentication methods, comma-separated.
public string PreferredAuthentications { get; set; }
PrivateKeyPassphrase
Passphrase protecting the private key.
public string PrivateKeyPassphrase { get; set; }