Public Key Exchange

Clario supports public key exchange for authenticating to our SFTP service without a password. This is ideal for automated transfers as it obviates the need for brittle scripting.

Creating an SSH key on Windows

1. Check for existing SSH keys

You should check for existing SSH keys on your local computer. You can use an existing SSH key in which case you reach out directly to Clario Support for final configuration. Open a command prompt, and run:

cd %userprofile%/.ssh

  • If you see “No such file or directory”, then there aren’t any existing keys: go to step 3.
  • Check to see if you have a key already: dir id_*
  • If there are existing keys, you may want to use those.

2. Back up old SSH keys

If you have existing SSH keys, but you don’t want to use them when connecting to Clario SFTP, you should back those up.

In a command prompt on your local computer, run:

mkdir key_backup copy id_rsa* key_backup

3. Generate a new SSH key

If you don’t have an existing SSH key that you wish to use, generate one as follows: Log in to your local computer as an administrator.

In a command prompt, run:

ssh-keygen -t rsa -C "your_email@example.com"

Associating the key with your email address helps you to identify the key later on. Note that the ssh-keygen command is only available if you have already installed Git (with Git Bash).

You’ll see a response similar to this:

../_images/win_keygen1.png

Just press <Enter> to accept the default location and file name. If the .ssh directory doesn’t exist, the system creates one for you. Enter, and re-enter, a passphrase when prompted.

The whole interaction will look similar to this:

../_images/win_keygen2.png

You’re done! Please contact support@clar.io to activate public-key authentication for your account.

Creating an SSH key on Linux & macOS

1. Check for existing SSH keys

You should check for existing SSH keys on your local computer. You can use an existing SSH key in which case you reach out directly to Clario Support for final configuration. Open a terminal and run the following:

cd ~/.ssh

If you see “No such file or directory, then there aren’t any existing keys: go to step 3. Check to see if you have a key already:

ls id_*

If there are existing keys, you may want to use them; go to either SSH user keys for personal use or SSH access keys for system use.

2. Back up old SSH keys

If you have existing SSH keys, but you don’t want to use them when connecting to Clario SFTP, you should back those up.

Do this in a terminal on your local computer, by running:

mkdir key_backup cp id_rsa* key_backup

3. Generate a new key

If you don’t have an existing SSH key that you wish to use, generate one as follows:

Open a terminal on your local computer and enter the following:

ssh-keygen -t rsa -C "your_email@example.com"

Associating the key with your email address helps you to identify the key later on.

You’ll see a response similar to this:

../_images/keygen1.png

Just press <Enter> to accept the default location and file name. If the .ssh directory doesn’t exist, the system creates one for you. Enter, and re-enter, a passphrase when prompted.

The whole interaction will look similar to this:

../_images/keygen2.png

You’re done! Please contact support@clar.io to activate public-key authentication for your account.