Skip to main content

Instructions for Generating and Sharing a Public Key for SFTP Access

Instructions for Generating and Sharing an SSH Key for SFTP Access

Written by Michael Fatica

MetaLocator Enterprise customers can authenticate with the SFTP connector using an SSH key pair.

There are two options:

  • MetaLocator can generate and provide a key pair for you, or

  • Your team can generate a key pair and share the public key with MetaLocator.


Key Requirements

  • Key type: RSA

  • Key length: Minimum 2048 bits (4096 recommended)

  • Private key format: PKCS#1 (RSA)

  • Private key must include:

    -----BEGIN RSA PRIVATE KEY-----
    ...
    -----END RSA PRIVATE KEY-----

Option 1: Generate a Key on Windows (PuTTYgen)

  1. Download and open PuTTYgen (puttygen.exe).

  2. Configure settings:

    • Key type: RSA (SSH-2 RSA)

    • Number of bits: 2048 minimum (4096 recommended)

  3. Click Generate.

  4. Move your mouse randomly in the blank area to complete key generation.

  5. Once generated:

    • Copy the public key from the “Public key for pasting…” field.

    • Paste it into a text editor (e.g., Notepad).

    • Save the file as:

      metalocator-YYYYMMDD.pub
  6. Click Save private key to store your private key securely.

  7. Provide the .pub file to the MetaLocator support team (via email or your support ticket).

Notes:

  • Passphrase is optional (can be left blank).

  • Do not share your private key.


Option 2: Generate a Key on Mac or Linux

1. Open Terminal

  • macOS: Applications → Utilities → Terminal

  • Linux: Open your preferred terminal

2. Run the Key Generation Command

ssh-keygen -t rsa -b 4096 -m PEM -C "your_username" -f metalocator-YYYYMMDD

Parameters:

  • -t rsa → Required key type

  • -b 4096 → Key length (minimum 2048)

  • -C → Label (email or username)

  • -f → Output filename

Example:

ssh-keygen -t rsa -b 4096 -m PEM -C "jane.doe@example.com" -f metalocator-20260507

3. Follow the Prompts

  • Press Enter to confirm file location

  • Choose a passphrase:

    • Optional (recommended for added security)

    • Or press Enter to leave blank


4. Locate Your Key Files

After generation, you will have:

  • Private keymetalocator-YYYYMMDD

  • Public keymetalocator-YYYYMMDD.pub

If no filename was specified, defaults are:

  • id_rsa (private key)

  • id_rsa.pub (public key)


5. Share Your Public Key

Send only the .pub file (e.g., metalocator-20260507.pub) to the MetaLocator support team via email or your support ticket.


Important Security Notes

  • Never share your private key

  • Store your private key securely

  • Do not modify key file contents


Optional: Verify Key Format

To confirm your key type:

ssh-keygen -lf metalocator-YYYYMMDD.pub

To verify the private key format, open the file and confirm it begins and ends with:

-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----

Using Your Private Key in MetaLocator

  • Copy and paste the private key exactly as-is into MetaLocator when configuring SFTP access

  • Do not edit or alter formatting

Did this answer your question?