> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SFTP

> Provides filesystem access through the Secure File Transfer Protocol (SFTP).

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Connect Alumio to an SFTP server and use it like a filesystem: read files from it and write files to it. SFTP transfers files over an encrypted SSH connection, so use this whenever you need to exchange files securely with a system that offers an SFTP server. You can sign in with either a password or a private key.

This documentation describes: [Schema](/schemas/filesystem/sftp)

## Fields

### General

<FormField property="config.host" label="Hostname" required>
  The address of the SFTP server, for example `sftp.example.com`.
</FormField>

<FormField property="config.port" label="Port">
  The port the SFTP server listens on. Defaults to `22`, the standard SFTP port. Only change this if your server uses a different port.
</FormField>

<FormField property="config.username" label="Username" required>
  The username of the SFTP account Alumio signs in with.
</FormField>

<FormField property="config.loginMethod" label="Login method">
  How Alumio signs in. Choose **Login with password** to use a password, or **Login with private key** to use an SSH key. Your choice decides which of the fields below you fill in. Defaults to **Login with password**.
</FormField>

<FormField property="config.password" label="Password">
  The password that goes with the username. Shown when the login method is **Login with password**. Keep this confidential.
</FormField>

<FormField property="config.privateKey" label="Private key">
  The SSH private key Alumio signs in with. Shown when the login method is **Login with private key**. It is a multi-line block that starts with `-----BEGIN RSA PRIVATE KEY-----` and ends with `-----END RSA PRIVATE KEY-----`. Keep this confidential.
</FormField>

<FormField property="config.passphrase" label="Passphrase for private key">
  The passphrase that unlocks the private key, if it has one. Shown when the login method is **Login with private key**. Passphrases are currently only supported for keys created with `ssh-keygen -m pem -t rsa`.
</FormField>

### Advanced

<FormField property="config.root" label="Remote root directory">
  The folder on the server that all reads and writes are relative to, so you do not have to repeat it in each path. Leave empty to use the server's default starting directory.
</FormField>

<FormField property="config.timeout" label="Connection timeout">
  How long, in seconds, Alumio waits for the server to respond before giving up. Can range from 0 to 600.
</FormField>

<FormField property="config.directoryPerm" label="Directory permissions">
  The permissions Alumio sets on any folders it creates on the server, written as a three-digit octal value such as `0744`. Defaults to `0744`. Leave it alone unless your server requires specific permissions.
</FormField>

<FormField property="config.hostFingerPrint" label="SSH fingerprint">
  The server's SSH fingerprint, used to confirm Alumio is talking to the right server and not an impostor. For example `88:76:75:96:c1:26:7c:dd:9f:87:50:db:ac:c4:a8:7c`. Leave empty to skip this check.
</FormField>

<FormField property="logger" label="Logger" diType="filesystem-logger">
  Selects how file activity on this connection is recorded, so you can trace which files were read or written.
</FormField>

## Sample data

A connection to an SFTP server using password sign-in, reading and writing within the `inbound` folder.

| Field                 | Value               |
| --------------------- | ------------------- |
| Hostname              | `sftp.example.com`  |
| Username              | `your-username`     |
| Login method          | Login with password |
| Password              | `your-password`     |
| Remote root directory | `inbound`           |

```json Configuration theme={null}
{
  "prototype": "sftp",
  "parameters": {
    "config": {
      "host": "sftp.example.com",
      "username": "your-username",
      "loginMethod": "password",
      "password": "your-password",
      "root": "inbound"
    }
  }
}
```
