# sftp

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: sftp
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: connect/components/outputs/sftp
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: connect/components/outputs/sftp.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/develop/pages/connect/components/outputs/sftp.adoc
page-git-created-date: "2024-09-09"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/develop/connect/components/outputs/sftp.md -->

**Type:** Output ▼

[Output](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/outputs/sftp/)[Input](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/inputs/sftp/)

**Available in:** Cloud, [Self-Managed](https://docs.redpanda.com/connect/components/outputs/sftp/%20%22View%20the%20Self-Managed%20version%20of%20this%20component%22)

Writes files to an SFTP server.

#### Common

```yml
outputs:
  label: ""
  sftp:
    address: "" # No default (required)
    credentials:
      username: ""
      password: ""
      host_public_key_file: "" # No default (optional)
      host_public_key: "" # No default (optional)
      private_key_file: "" # No default (optional)
      private_key: "" # No default (optional)
      private_key_pass: ""
    path: "" # No default (required)
    codec: all-bytes
    max_in_flight: 64
```

#### Advanced

```yml
outputs:
  label: ""
  sftp:
    address: "" # No default (required)
    connection_timeout: 30s
    credentials:
      username: ""
      password: ""
      host_public_key_file: "" # No default (optional)
      host_public_key: "" # No default (optional)
      private_key_file: "" # No default (optional)
      private_key: "" # No default (optional)
      private_key_pass: ""
    path: "" # No default (required)
    codec: all-bytes
    max_in_flight: 64
```

In order to have a different path for each object you should use function interpolations described [here](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

## [](#performance)Performance

This output benefits from sending multiple messages in flight in parallel for improved performance. You can tune the max number of in flight messages (or message batches) with the field `max_in_flight`.

## [](#fields)Fields

### [](#address)`address`

The address (hostname or IP address) of the SFTP server to connect to.

**Type**: `string`

### [](#codec)`codec`

The way in which the bytes of messages should be written out into the output data stream. It’s possible to write lines using a custom delimiter with the `delim:x` codec, where x is the character sequence custom delimiter.

**Type**: `string`

**Default**: `all-bytes`

| Option | Summary |
| --- | --- |
| all-bytes | Only applicable to file based outputs. Writes each message to a file in full, if the file already exists the old content is deleted. |
| append | Append each message to the output stream without any delimiter or special encoding. |
| delim:x | Append each message to the output stream followed by a custom delimiter. |
| lines | Append each message to the output stream followed by a line break. |

```yaml
# Examples:
codec: lines

# ---

codec: delim:

# ---

codec: delim:foobar
```

### [](#connection_timeout)`connection_timeout`

The connection timeout to use when connecting to the target server.

**Type**: `string`

**Default**: `30s`

### [](#credentials)`credentials`

The credentials required to log in to the SFTP server. This can include a username and password, or a private key for secure access.

**Type**: `object`

### [](#credentials-host_public_key)`credentials.host_public_key`

The raw contents of the SFTP server’s public key, used for host key verification.

**Type**: `string`

### [](#credentials-host_public_key_file)`credentials.host_public_key_file`

The path to the SFTP server’s public key file, used for host key verification.

**Type**: `string`

### [](#credentials-password)`credentials.password`

The password to use for authentication. Used together with `username` for basic authentication or with encrypted private keys for secure access.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

**Default**: `""`

### [](#credentials-private_key)`credentials.private_key`

The private key used to authenticate with the SFTP server. This field provides an alternative to the [`private_key_file`](#credentials-private_key_file).

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

### [](#credentials-private_key_file)`credentials.private_key_file`

The path to a private key file used to authenticate with the SFTP server. You can also provide a private key using the [`private_key`](#credentials-private_key) field.

**Type**: `string`

### [](#credentials-private_key_pass)`credentials.private_key_pass`

A passphrase for private key.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

**Default**: `""`

### [](#credentials-username)`credentials.username`

The username required to authenticate with the SFTP server.

**Type**: `string`

**Default**: `""`

### [](#max_in_flight)`max_in_flight`

The maximum number of messages to have in flight at a given time. Increase this to improve throughput.

**Type**: `int`

**Default**: `64`

### [](#path)`path`

The file to save the messages to on the SFTP server. This field supports [interpolation functions](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`