Actions Center requires you to connect to your feeds dropbox using a Secure
Shell (SSH) connection. SSH is a network protocol that ensures secure data
transfer between your systems and Google's servers.

To authenticate this secure connection without relying on passwords, you need an
**SSH key pair**. A key pair consists of two matching components:

- **Private Key:** A secret key that resides securely on your system or is managed by your application. This key acts as your secure credential.
- **Public Key:** A non-secret key that you upload to Actions Center. Google uses this to verify your private key's signature when you establish an SFTP connection to upload feeds.

When you connect using SFTP, your client will automatically use your private key
to securely authenticate with the Actions Center dropboxes holding your
associated public key.

A public key is a single string that typically starts with `ssh-rsa` and ends
with an identifier such as your email address. For example:

    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCXsM9ycbHV6E6t2L+B4p/uYHn9Q0jmu5gUXMYnFnnf4l39xrznfDo8KCASzRrqUkRnuzrno059CvZVzcljkbwWLzKKoE1EwbzHL3nYahMB4MdYNWhBbHbB+ybq6RNO7hkoKDBIQCfqQDY0FEB6sV3d3F1WYl0bAMjp15yyZJzMKa/rRnZKWetHlcL1X+gFWmW2hQ93foPD463gb58/25GujjsS/tzjngw7UJMVkm08U1QEY3z3DE/R++7ovJozTCzH0CTNDN0AH3/oSC3dmG+yDh3ZXFATjWjyPXJSOziNrp9TXgJhlqSmoHcPvpotMVjx21kIZ+T+SusQmnG+hK+L user@yourdomain.com

> [!NOTE]
> **Note:** Your public key must be a single line (no line breaks) and must end with an email address comment containing an `@` symbol (for example, `user@yourdomain.com`) to pass Partner Portal validation.

## Generate an SSH Key Pair

You can create an SSH key pair using the `ssh-keygen` command line utility,
which is natively available on Linux, macOS, and most Windows environments.

1. Open your terminal or command prompt.

2. Run the following command to generate a new RSA key pair, replacing
   `user@yourdomain.com` with your email address and `google_actions_center`
   with a filename of your choice:

   `ssh-keygen -t rsa -C "user@yourdomain.com" -f google_actions_center`
3. When prompted, press Enter to create a key without a passphrase, or enter a
   passphrase to encrypt your private key locally. You don't need to provide
   this passphrase to Google.

4. This command creates two files:

   - **`google_actions_center` (Private Key):** Keep this file secure on your system. You will provide this key to your SFTP client when connecting.
   - **`google_actions_center.pub` (Public Key):** This is the key you will share with Actions Center.
5. Open your public key (`google_actions_center.pub`) in a text editor and copy
   its entire contents.

6. Provide this public key in your Actions Center account Onboarding Tasks
   during account setup, or under
   [Feeds Configuration](https://actionscenter.google.com/configuration/feeds)
   to update the key after account setup.

## Steps to test SFTP connectivity

1. View your SFTP dropbox connection information in
   [Feeds Configuration](https://actionscenter.google.com/configuration/feeds).

2. With the connection information for the respective dropbox, connect to the
   SFTP. For example using the `sftp` command line program (available on
   Windows, Linux and Mac):

   `sftp -P <port> -i google_actions_center <user>@partnerupload.google.com`

   > [!NOTE]
   > **Note:** Your Google representative will provide the `<user>` for the respective dropbox you are using (they will be environment dependent).

   Upload feed files:

   `put <filename>`

   > [!NOTE]
   > **Note:** In this example, the file is uploaded to the SFTP root directory. You can upload to a specific directory, but remember to use the absolute path in the **data_file** list when uploading feeds that require a filesetdesc.json.

3. If you experience issues when connecting to the SFTP server, try running
   with verbose information `sftp -v`. Issues can occur due to network
   firewalls blocking outgoing connections or ssh client configurations that
   are not compatible with the server.

   Check that your public key is correct by running `ssh-keygen -l -f
   google_actions_center.pub`.

   If the key is not valid, the program will output `google_actions_center.pub
   is not a public key file`.