# 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/inputs/sftp
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: connect/components/inputs/sftp.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/develop/pages/connect/components/inputs/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/inputs/sftp.md -->

**Type:** Input ▼

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

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

Consumes files from an SFTP server.

#### Common

```yml
inputs:
  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: ""
    paths: [] # No default (required)
    auto_replay_nacks: true
    scanner:
      to_the_end: {}
    watcher:
      enabled: false
      minimum_age: 1s
      poll_interval: 1s
      cache: ""
```

#### Advanced

```yml
inputs:
  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: ""
    max_sftp_sessions: 10
    paths: [] # No default (required)
    auto_replay_nacks: true
    scanner:
      to_the_end: {}
    delete_on_finish: false
    watcher:
      enabled: false
      minimum_age: 1s
      poll_interval: 1s
      cache: ""
```

## [](#metadata)Metadata

This input adds the following metadata fields to each message:

-   sftp\_path


You can access these metadata fields using [function interpolation](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

## [](#fields)Fields

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

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

**Type**: `string`

### [](#auto_replay_nacks)`auto_replay_nacks`

Whether messages that are rejected (nacked) at the output level should be automatically replayed indefinitely, eventually resulting in back pressure if the cause of the rejections is persistent. If set to `false` these messages will instead be deleted. Disabling auto replays can greatly improve memory efficiency of high throughput streams as the original shape of the data can be discarded immediately upon consumption and mutation.

**Type**: `bool`

**Default**: `true`

### [](#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 the 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**: `""`

### [](#delete_on_finish)`delete_on_finish`

Whether to delete files from the server once they are processed.

**Type**: `bool`

**Default**: `false`

### [](#max_sftp_sessions)`max_sftp_sessions`

The maximum number of SFTP sessions.

**Type**: `int`

**Default**: `10`

### [](#paths)`paths[]`

A list of paths to consume sequentially. Glob patterns are supported.

**Type**: `array`

### [](#scanner)`scanner`

The [scanner](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/scanners/about/) by which the stream of bytes consumed will be broken out into individual messages. Scanners are useful for processing large sources of data without holding the entirety of it within memory. For example, the `csv` scanner allows you to process individual CSV rows without loading the entire CSV file in memory at once.

**Type**: `scanner`

**Default**:

```yaml
to_the_end: {}
```

### [](#watcher)`watcher`

An experimental mode whereby the input will periodically scan the target paths for new files and consume them, when all files are consumed the input will continue polling for new files.

**Type**: `object`

### [](#watcher-cache)`watcher.cache`

A [cache resource](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/caches/about/) for storing the paths of files already consumed.

**Type**: `string`

**Default**: `""`

### [](#watcher-enabled)`watcher.enabled`

Whether file watching is enabled.

**Type**: `bool`

**Default**: `false`

### [](#watcher-minimum_age)`watcher.minimum_age`

The minimum period of time since a file was last updated before attempting to consume it. Increasing this period decreases the likelihood that a file will be consumed whilst it is still being written to.

**Type**: `string`

**Default**: `1s`

```yaml
# Examples:
minimum_age: 10s

# ---

minimum_age: 1m

# ---

minimum_age: 10m
```

### [](#watcher-poll_interval)`watcher.poll_interval`

The interval between each attempt to scan the target paths for new files.

**Type**: `string`

**Default**: `1s`

```yaml
# Examples:
poll_interval: 100ms

# ---

poll_interval: 1s
```