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
| Setting | Value |
|---|---|
| Host | sftp.flex-charge.com |
| Port | 22 |
| Protocol | SFTP over SSH |
| Auth | Public-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:
- Open a terminal or command prompt.
- Run one of the commands below to generate a key pair. In each case the private key is saved as
transfer-keyand the public key astransfer-key.pubin the current directory.
| Algorithm | Command | Notes |
|---|---|---|
| ED25519 (recommended) | ssh-keygen -t ed25519 -f transfer-key | Preferred for SFTP authentication. |
| ECDSA | ssh-keygen -t ecdsa -b 256 -N '' -m PEM -f transfer-key | Valid -b values are 256, 384, and 521. |
| RSA (default type) | ssh-keygen -P '' -f transfer-key | Generates 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:
- Download and install PuTTYgen from the official website: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- Launch PuTTYgen.
- Select the desired key type (e.g., RSA, DSA, ECDSA, ED25519) from the "Parameters" section.
- Click on the "Generate" button to create a new key pair.
- Follow the instructions to generate randomness by moving the mouse over the blank area of the PuTTYgen window.
- 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.
- Click on the "Save public key" button to save the public key (.pub) to a location on your computer.
- 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.
Updated 15 days ago

