## Configuring your SFTP destination

### Prerequisites

By default, SFTP uses keypair authentication for access. You will need a provided public key to configure your destination. It will look roughly like this:

```shell
ssh-key <ssh_public_key_beginning_with_AAAA> some-comment
```

### Step 1: Create a user on the SFTP server

Login to the SFTP server and complete the steps below.

Create group `sftpwriter`:

```shell
sudo groupadd sftpwriter
```

Create user `sftpwriter`:

```shell
sudo useradd -m -g sftpwriter sftpwriter
```

Switch to the `sftpwriter` user:

```shell
sudo su - sftpwriter
```

Create the .ssh directory:

```shell
mkdir ~/.ssh
```

Set permissions:

```shell
chmod 700 ~/.ssh
```

Navigate to the `.ssh` directory:

```shell
cd ~/.ssh
```

Create the `authorized_keys` file:

```shell
touch authorized_keys
```

Set permissions:

```shell
chmod 600 authorized_keys
```

Add the public key to the `authorized_keys` file. The key -- including the "ssh-key" and comment -- should be all on one line in the file, without linebreaks.

```shell
echo "ssh-key <ssh_public_key_beginning_with_AAAA> sftpwriter-public-key" > authorized_keys
```

## Step 2: Add your destination

Share your host name, folder name, username, port, and public key with us to complete the connection.
