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.
What a Key Pair Is
Section titled “What a Key Pair Is”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 does | What you do |
|---|---|
| Gives you a username and password | Choose 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 file | Check its format, then paste it into Nexadata. |
| Asks you to send them a public key | Create 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 says | What it means | What to do |
|---|---|---|
-----BEGIN OPENSSH PRIVATE KEY----- | OpenSSH format | Ready to use. Do the passphrase check, then paste it into Nexadata. |
-----BEGIN RSA PRIVATE KEY----- | PEM format | Ready to use. Do the passphrase check, then paste it into Nexadata. |
-----BEGIN RSA PRIVATE KEY-----, and the next line says Proc-Type: 4,ENCRYPTED | A PEM key protected by a passphrase | Remove the passphrase, then paste it into Nexadata. |
PuTTY-User-Key-File-... (often a file ending in .ppk) | PuTTY format, common on Windows | Contact Nexadata Support for help converting it. |
Starts with ssh-rsa or ssh-ed25519, or the file name ends in .pub | This is a public key, not a private key | It belongs on the server, not in Nexadata. Ask for the private key, or create your own key pair. |
| Anything else | An unusual format | Contact Nexadata Support. |
Nexadata accepts RSA private keys in both OpenSSH and PEM format, so you don’t need to convert between the two.
Check for a Passphrase
Section titled “Check for a Passphrase”A key can carry its own password, called a passphrase. Use a key without one.
-
Open Terminal (Mac) or PowerShell (Windows), and go to the folder that holds the key.
-
Run this command, replacing
your_key_filewith your key’s file name:Terminal window ssh-keygen -y -f your_key_file -
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.
- If it prints a long line starting with
Remove a Passphrase
Section titled “Remove a Passphrase”This changes the key file in place, so make a copy of the file first.
-
In Terminal or PowerShell, run:
Terminal window ssh-keygen -p -f your_key_file -
Type the current passphrase when asked, and press Enter.
-
When it asks for a new passphrase, press Enter, then press Enter again. This leaves the passphrase empty.
-
Run the passphrase check again. It should now print a line starting with
ssh-rsa.
Step 3: Create a Key Pair
Section titled “Step 3: Create a Key Pair”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.
-
Open Terminal (Mac) or PowerShell (Windows).
-
Run this command:
Terminal window ssh-keygen -t rsa -b 4096 -f nexadata_sftp_key -
When it asks for a passphrase, press Enter, then press Enter again. This creates the key without a passphrase.
-
Two new files are now in the current folder:
nexadata_sftp_keyis the private key. It goes into Nexadata. Keep it safe and never email it.nexadata_sftp_key.pubis the public key. Send this file to the server administrator.
-
Copy the private key so you can paste it into Nexadata:
Computer Command Mac pbcopy < nexadata_sftp_keyWindows Get-Content -Raw nexadata_sftp_key | Set-ClipboardNothing 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.
Next Steps
Section titled “Next Steps”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:
ssh-keygen -p -m PEM -N "" -P "" -f copy_of_your_keyThe 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.