SSH Key Generation (SFTP)

This document provides instructions for generating SSH key pairs (private and public) using different methods. SSH keys are used for secure authentication and encryption between a client and a server.

FlexFactor SFTP connection details

SettingValue
Hostsftp.flex-charge.com
Port22
ProtocolSFTP over SSH
AuthPublic-key (ed25519 recommended)

After generating a key pair below, send the public key (transfer-key.pub) to FlexFactor for installation on the SFTP host. The private key never leaves your environment.


SSH Key Pair Generation Methods

This documentation covers two methods for generating SSH key pairs:

Using the command line on macOS and Unix operating systems.
Using PuTTYgen on Windows operating systems.

Method 1: Generating SSH Key Pair on macOS and Unix

To generate an SSH key pair on macOS and Unix operating systems, follow the steps below:

  1. Open a terminal or command prompt.
  2. Run one of the commands below to generate a key pair. In each case the private key is saved as transfer-key and the public key as transfer-key.pub in the current directory.
AlgorithmCommandNotes
ED25519 (recommended)ssh-keygen -t ed25519 -f transfer-keyPreferred for SFTP authentication.
ECDSAssh-keygen -t ecdsa -b 256 -N '' -m PEM -f transfer-keyValid -b values are 256, 384, and 521.
RSA (default type)ssh-keygen -P '' -f transfer-keyGenerates the default key type.

Method 2: Generating SSH Key Pair on Windows using PuTTYgen

Windows users can use PuTTYgen, a graphical tool, to generate SSH key pairs. Follow the steps below:

  1. Download and install PuTTYgen from the official website: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
  2. Launch PuTTYgen.
  3. Select the desired key type (e.g., RSA, DSA, ECDSA, ED25519) from the "Parameters" section.
  4. Click on the "Generate" button to create a new key pair.
  5. Follow the instructions to generate randomness by moving the mouse over the blank area of the PuTTYgen window.
  6. Once the key pair is generated, you can set an optional passphrase for added security. Enter the passphrase in the "Key passphrase" and "Confirm passphrase" fields.
  7. Click on the "Save public key" button to save the public key (.pub) to a location on your computer.
  8. Click on the "Save private key" button to save the private key (.ppk) to a secure location on your computer.

SFTP/FTP Clients

After generating the key pair, you can use the private key with popular SFTP clients for authentication. Here are a few examples:

FileZilla: In FileZilla, go to "Edit" -> "Settings" -> "SFTP" -> "Add key file" and select your private key file. Download FileZilla

WinSCP: In WinSCP, go to "Session" -> "SSH" -> "Authentication" and select your private key file. Download WinSCP

❗️

Remember to keep your private key secure and do not share it with anyone.


Did this page help you?