Data connector for SFTP

The data connector for SFTP enables you to directly import a dataset from your server.

Before starting, you will need the following information to hand:

  • Host

  • Port

  • Username

  • One of:

    • Password

    • Private Key Pem (Password-less connection).

  • Path

  • Filename

  • Host public key in one of the format:
    • OpenSSH authorised_keys - "Authorised Keys"
    • OpenSSH known_hosts - "Known Hosts"
    • PEM - "Public Key PEM"

To configure a connection, login to the Platform and either create a dataset or access the Bunker of an existing dataset. Once you're in the Bunker, select Import a dataset or use the Import tab, and locate the SFTP connector. 

Screenshot 2020-05-13 at 11.53.06

Click Connect and a form will appear as shown below to enter your credentials

Screenshot 2020-07-23 at 10.39.12

Above form contains four different things:

  1. Connection - Fields: Host, Port, Path
  2. Authentication - Fields: Username, Password or Private Key Pem
  3. Host Verification - Fields: Authorized Keys or Known Hosts or Public Key Pem
  4. GPG Encryption -  GPG Public to encrypt the file

In bunker UI, you may need to enter three different keys for different purposes. Here are the keys.

Private Key Pem:

You can ignore this field if you are establishing a connection using a password.

This is a user authorisation key (User's SSH private key) replacing the password and will be in the form of a public/private key pair. 

If you are establishing a connection using SSH key/password-less, you will need to add the public ssh key into the authorized keys file on your server and put the private SSH key in the Private Key Pem field in UI.

Host Verification Key:

You will need to enter a host public key in one of the below format (You need to enter only one)

  • Host Public Keys (OpenSSH authorized_keys format) - "Authorised Keys" in Bunker UI
  • Host Public Keys (OpenSSH known_hosts format) - "Known Hosts" in Bunker UI
  • Host Public Keys (PEM Format)  - "Public Key PEM" in Bunker UI

Please note this key is NOT the same as the public part of the user SSH key, this is a public key associated with your server, not with your user.

You can find this key in one of two ways.
1) Your IT team can look it up on the server (probably in the /etc/ssh directory) and there will be a number of files e.g.
     - ssh_host_ecdsa_key.pub
     - ssh_host_ed25519_key.pub
The contents of one of these files can just be put straight into the "Authorised Keys" field on the bunker UI. An example format for the ecdsa file:

ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdH..........<redacted>........LB9u5V+o

2) Alternatively, you can SSH into your server then generate a key pair using the following command "ssh-keygen -F <hostname>" then look up in your local known_hosts file for the public key for that host.

GPG Key:

You can ignore this field if you are not uploading an encrypted file.

Your bunker will generate a public/private key pair. You can use the GPG public key provided to you in the UI for encrypting your file.

Screenshot 2020-07-23 at 11.08.10

When you entered all required fields, click Connect

Screenshot 2020-07-23 at 10.39.12

Next, copy the file name into the Key box and select Download, then Connect.

Screenshot 2020-07-23 at 11.03.41

If you are uploading an encrypted file, enable "This file is gpg encrypted" button. When you click Download, the bunker will decrypt the file using bunker private key

A subset of the data will then appear as a preview. You can perform some minor manipulations at this point, such as selecting which columns to import, renaming columns, and excluding rows.

When you're happy with the preview, accept the settings and select a blank import configuration, then you'll be taken to the Import Wizard. This will show how our Platform has understood your dataset and mapped columns into our Global Schema.

If this looks correct, accept the Wizard Settings, otherwise, untick the boxes so they can be correctly mapped during the later normalisation phase.