Skip to content

Preparing SFTP Access for Nexadata

Before you add an SFTP connection in Nexadata, you need a way for Nexadata to sign in to the server. This page walks you through it, whether your server administrator gives you a password, gives you a key file, or asks you for a key. You don’t need to be technical to follow it, and every command works the same way on Mac and Windows.

When you’re done, go back to Setting up an SFTP Connection to finish the setup.

A key pair is two small text files that are created together:

  • The private key stays with you. You paste it into Nexadata, and you never send it to anyone else.
  • The public key is safe to share. You send it to the server administrator, who attaches it to your SFTP account.

When Nexadata connects, the server checks that the two keys match. Think of the public key as a lock on the server, and the private key as the only key that opens it.

Step 1: Work Out Which Situation You Are In

Section titled “Step 1: Work Out Which Situation You Are In”

Ask the server administrator how they want Nexadata to sign in. One of three things will happen:

What the server administrator doesWhat you do
Gives you a username and passwordChoose Password as the Authentication Type when you add the connection in Nexadata. You don’t need any keys. Skip to allowlisting the Nexadata IP address.
Gives you a private key fileCheck its format, then paste it into Nexadata.
Asks you to send them a public keyCreate a key pair, send them the public key, and paste the private key into Nexadata.

Step 2: Check the Format of a Private Key You Were Given

Section titled “Step 2: Check the Format of a Private Key You Were Given”

Open the key file in a plain text editor (TextEdit on Mac, Notepad on Windows) and look at the first line. Don’t change or save anything.

The first line saysWhat it meansWhat to do
-----BEGIN OPENSSH PRIVATE KEY-----OpenSSH formatReady to use. Do the passphrase check, then paste it into Nexadata.
-----BEGIN RSA PRIVATE KEY-----PEM formatReady to use. Do the passphrase check, then paste it into Nexadata.
-----BEGIN RSA PRIVATE KEY-----, and the next line says Proc-Type: 4,ENCRYPTEDA PEM key protected by a passphraseRemove the passphrase, then paste it into Nexadata.
PuTTY-User-Key-File-... (often a file ending in .ppk)PuTTY format, common on WindowsContact Nexadata Support for help converting it.
Starts with ssh-rsa or ssh-ed25519, or the file name ends in .pubThis is a public key, not a private keyIt belongs on the server, not in Nexadata. Ask for the private key, or create your own key pair.
Anything elseAn unusual formatContact Nexadata Support.

Nexadata accepts RSA private keys in both OpenSSH and PEM format, so you don’t need to convert between the two.

A key can carry its own password, called a passphrase. Use a key without one.

  1. Open Terminal (Mac) or PowerShell (Windows), and go to the folder that holds the key.

  2. Run this command, replacing your_key_file with your key’s file name:

    Terminal window
    ssh-keygen -y -f your_key_file
  3. Check what happens:

    • If it prints a long line starting with ssh-rsa, the key has no passphrase. You’re done, and the key is ready to paste into Nexadata.
    • If it asks you to enter a passphrase, the key has one. Remove it with the steps below.

This changes the key file in place, so make a copy of the file first.

  1. In Terminal or PowerShell, run:

    Terminal window
    ssh-keygen -p -f your_key_file
  2. Type the current passphrase when asked, and press Enter.

  3. When it asks for a new passphrase, press Enter, then press Enter again. This leaves the passphrase empty.

  4. Run the passphrase check again. It should now print a line starting with ssh-rsa.

Do this when the server administrator asks you to send them a public key. You use ssh-keygen, a tool that comes with macOS and with Windows 10 and later, so there’s nothing to install.

Create a new key pair just for Nexadata. Don’t reuse a key you use for anything else.

  1. Open Terminal (Mac) or PowerShell (Windows).

  2. Run this command:

    Terminal window
    ssh-keygen -t rsa -b 4096 -f nexadata_sftp_key
  3. When it asks for a passphrase, press Enter, then press Enter again. This creates the key without a passphrase.

  4. Two new files are now in the current folder:

    • nexadata_sftp_key is the private key. It goes into Nexadata. Keep it safe and never email it.
    • nexadata_sftp_key.pub is the public key. Send this file to the server administrator.
  5. Copy the private key so you can paste it into Nexadata:

    ComputerCommand
    Macpbcopy < nexadata_sftp_key
    WindowsGet-Content -Raw nexadata_sftp_key | Set-Clipboard

    Nothing prints, but the private key is now on your clipboard. You can also open the file in TextEdit or Notepad, select everything, and copy it.

Your sign-in details are ready. Go back to Setting up an SFTP Connection to allowlist the Nexadata IP address and add the connection.

Optional: convert a key between OpenSSH and PEM format

Nexadata accepts both formats, so you only need this if another system asks for a PEM key. The command rewrites the file, so run it on a copy:

Terminal window
ssh-keygen -p -m PEM -N "" -P "" -f copy_of_your_key

The first line of the copy then reads -----BEGIN RSA PRIVATE KEY-----. It’s the same key stored a different way, so nothing needs to change on the server.