Upload using SFTP

Access your SFTP folder that is hosted by Lexer

Lexer manages an SFTP server for the upload and download of secure client and partner data. All files containing sensitive information must be transferred via this method. In this article we'll discuss how Lexer uses SFTP, how to manage your access credentials, and how to access your Lexer SFTP on either Windows or Mac OS.

Step 1. Receive your Lexer SFTP details

Our team will provide you with details about your Lexer SFTP directory - usually via email. This will contain information such as your Username, Host, URL, and relevant paths for reading and writing files. You'll need this information to complete step 5.

Step 2. Generate your SSH Keys

Generating your SSH key files using Terminal (Mac)

Let's use Terminal to generate a matching key pair for secure authentication.

  1. Open the Terminal program.
  2. Type [.code]ssh-keygen -t rsa[.code] and hit return to launch the public/private key generation functionality.
  3. Hit return to save the public and private keys to the default file location.
  4. Enter a passphrase to secure your SSH key (optional but recommended), and hit return.
  5. Enter your passphrase again (if used), and hit return once more to generate. This has now created two files, named by default, and stored in Users/yourusername/.ssh/.
  6. Now switch to a Finder window to navigate to the specified directory. To show your hidden files press shift + command + .

- A public key - id_rsa.pub - you will be uploading this to your Lexer Hub in step 3.

- A private key - id_rsa - you will be using this within your SFTP Application in step 5.

Generating your SSH key files using WinSCP (Windows)

Let's use WinSCP to generate a matching key pair for secure authentication.

  1. Download WinSCP and follow the prompts to install it.
  2. Open WinSCP and select Tools on the bottom left hand side and select PuTTYgen.
  3. Leave all options as standard and select Generate. You will be prompted to move your mouse around the grey box to generate a randomized encryption key.
  4. Click Save Public Key and name it lexer-public. You will need this in step 3.
    Click Save Private Key and name it lexer-private. You will need this in step 5.

You can also generate your SSH keys using other tools such as OpenSSH Client

Step 3. Whitelist your SSH public key in Lexer

Lexer secures client SFTP servers using a combination of public/private key cryptography as well as IP address whitelisting. In order to access your SFTP you will need to whitelist your IP address and SSH key.

Your public key should be in the following format:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDak1o/aM7thKXrnjTmM6+NXfMzqsRMYXVbYqr2vnGTgM6dpsno8Y8/CAhgg7BTZkXVkyi0U9egyvZPEd54rdBimrisPYU9o7eeFUt9aCsY3A5UVmKBVBJII/heJCgteOiQgoGqElzfCGAj1s+O93iMI8XjGtWI6LH788twZaOALeT3c0LB5bPWE8YvhAmMS28mcrKDxcNMBkRjAYAZv3sfKiZlQlsp7GdY7rHnXSRjhobII9qxP67Ytww0w4JULqiQ9j0TlGbZKkw8VT9EgBYAfsmAWdDWEBT7MxS4uT1wEsDziJ3SBrGAuknnYHm6lANchIIlolecthOoxqZAyd0lp7vx8htEjBrpENYBwL9a+kgTq8MdeVm0mNTHdsTcsUscsIMUHNXEZ14r+ZnMFNqt0TK6qPGs6VZ1fezLnsPf5oe/cEfOkDaS3u37wWvATV9N1tMUy9KFPq81RfDcMRvuUjyB98Q8dlEXZdETSItSI0Yo0wBkmCi3sLClVgzwt3E=

Navigate to Lexer > Manage > Integrations > SFTP and add this public key by clicking 'Add SSH Public Key'.

2783

It may take up to 30 minutes for SSH key whitelisting changes to become active.

If you're getting an "Invalid Key Format" error when entering your public key into the SFTP tile in Lexer, please run the following command in your terminal to convert your key into the required format:

[.code]ssh-keygen -i -f [your_key_filename.pub][.code]

Step 4. Whitelist your IP address in Lexer

Any system or device accessing your Lexer SFTP will need to have its IP address whitelisted. If you are configuring a system to access your Lexer SFTP, then you will need to ensure it is configured using a static IP address. If you are accessing your Lexer SFTP via your local device (e.g. your work computer), then you will need to whitelist your home or office IP address.

To find your current IP address, head to whatismyipaddress.com on the network you will access the SFTP from (e.g. your office) and copy the results shown on the website. Navigate to Lexer > Manage > Integrations > SFTP and add this IP address by clicking 'Add IP Address'.

It may take up to 30 minutes for IP address whitelisting changes to become active.

Step 5. Access your Lexer SFTP

Accessing SFTP using WinSCP (Windows)

  1. Download WinSCP and follow the prompts to install it.
  2. Open WinSCP and select 'New Site' on the top left hand side.
  3. Fill in the host, port, and username as per the documentation. Do not add a password as you will be using your keys to authenticate. To do this click advanced, then advanced again.
  4. Click Advanced, then Advanced again.
  5. Click Authentication under the SSH tree and select your private key file. Hit Ok.
  6. Select Save and choose the name "Lexer SFTP". You're now able to send us your customer data files as well as receive files exported from the Hub via Activate.

Accessing SFTP using FileZilla (Windows / Mac)

  1. Download FileZilla and follow the prompts to install it.
  2. Once downloaded, go to File > Site Manager.
  3. Fill in the following fields as provided in your SFTP Access documentation.
  4. Host: as detailed in your SFTP access documentation.
  5. Port: as detailed in your SFTP access documentation.
  6. Protocol: SFTP - SSH File Transfer Protocol.
  7. Logon Type: Key file.
  8. User: as detailed in your SFTP access documentation.
  9. Key file: select your private ssh key as generated in previous steps.
  10. Click Connect. You're now able to send us your customer data files as well as receive files exported from the Hub via Activate.

Troubleshooting your Lexer SFTP

Having trouble connecting to your Lexer SFTP? We've outlined a number of common scenarios and the likely diagnosis in the table below. Get in touch with Lexer Support if you need assistance.

Outcome (using sftp -i path_to_private_key myuser@au.transfer.lexer.io) Host is correct? Port is correct? Private key is valid format? IP is whitelisted? User is correct? Public key is whitelisted?
ssh: Could not resolve hostname azzz.lexer.transfer.io: nodename nor servname provided, or not known Connection closed No - - - - -
ssh: connect to host au.transfer.io port 30: Operation timed out Connection closed Yes No - - - -
Load key "path_to_private_key": invalid format myuser@au.transfer.lexer.io: Permission denied (publickey) Yes Yes No - - -
ssh: connect to host au.transfer.io port 22: Operation timed out Connection closed Yes Yes Yes No - -
myuser@au.transfer.lexer.io: Permission denied (publickey) Yes Yes Yes Yes No -
myuser@au.transfer.lexer.io: Permission denied (publickey) Yes Yes Yes Yes - No
Connection successful Yes Yes Yes Yes Yes -

That's it for SFTP

In this article we outlined the purpose for SFTP, how to set it up, and ran through a few common scenarios that you may need help troubleshooting. Please reach out to your Success Manager or Lexer Support if you have any questions.

Updated:
March 7, 2024
Did this page help you?
Thank you! Your feedback has been received!
Oops! Something went wrong while submitting the form, for assistance please contact support@lexer.io