English
SSH Keys
You usually log in to a VPS with the root account and the password sent by your provider. Passwords carry two big risks: a leaked password means losing full control of the server, and attackers can guess passwords by brute force. That is why, on every server connected to FlashPanel, SSH password login is disabled by default; you log in with an SSH Key instead.
What is an SSH Key?
An SSH Key is a pair of keys used instead of a password for SSH logins:
- Private key: stays on your computer and must never be shared.
- Public key: a line of text starting with
ssh-ed25519 ...orssh-rsa ..., added to the server.
When you log in, the server checks that your computer holds the private key matching the public key that was added. Only someone with the private key can log in.
Some Windows software (PuTTY, WinSCP, some database tools) needs the private key in PuTTY (.ppk) format, while the ssh command and most other tools use the OpenSSH format. The guide below shows how to create both.
Generate SSH Key
Quick way: generate it in FlashPanel (any operating system)
- Open the SSH Keys page and click Add SSH Key.
- In the dialog, click Generate SSH Key. FlashPanel fills in the Name and Public key.
- Download all 3 files with the OpenSSH Key, PuTTY Key (
.ppk), and Public Key (.pub) buttons, and keep them safe. - Click Add SSH Key to save.
WARNING
The private key is issued only once. If you close the dialog without downloading it, you need to generate a new key.
Keys added on this page are Global SSH Keys: they are automatically added to every new server you create.
Windows
Using PowerShell (OpenSSH format)
Windows 10 (version 1809 or later) and Windows 11 usually include the OpenSSH Client. If ssh-keygen is not found, open Settings > System > Optional features (Windows 10: Settings > Apps > Optional features), click Add a feature (or View features), find OpenSSH Client, and click Install.
Open PowerShell and run:
powershellssh-keygen -t ed25519Press Enter to save in the default location. You can enter a passphrase to protect the private key, or press Enter to skip.
The command creates the private key
id_ed25519and the public keyid_ed25519.pubinC:\Users\<your-name>\.ssh\. Show the public key to copy it:powershellGet-Content "$env:USERPROFILE\.ssh\id_ed25519.pub"
Using PuTTYgen (PuTTY .ppk format)
- Install PuTTY and open PuTTYgen.
- Under Type of key to generate, choose EdDSA (Ed25519) or RSA (2048 bits or more).
- Click Generate and move the mouse randomly over the blank area of the window until it finishes.
- (Optional) Enter a password for the private key in Key passphrase and Confirm passphrase.
- Click Save private key to save the
.ppkfile. - Copy the entire content of the Public key for pasting into OpenSSH authorized_keys file box (starting with
ssh-ed25519orssh-rsa). This is the public key to add to FlashPanel.
If you also need the private key in OpenSSH format, choose Conversions > Export OpenSSH key.
macOS
Open Terminal and run:
bashssh-keygen -t ed25519Press Enter to save in the default location (
~/.ssh/id_ed25519), then enter a passphrase or press Enter to skip.Copy the public key to the clipboard:
bashpbcopy < ~/.ssh/id_ed25519.pub
If you need the private key in PuTTY (.ppk) format, install puttygen with Homebrew and convert it:
bash
brew install putty
puttygen ~/.ssh/id_ed25519 -o ~/.ssh/id_ed25519.ppkLinux
Open a terminal and run (if
ssh-keygenis missing, install it withsudo apt install openssh-client):bashssh-keygen -t ed25519Press Enter to save in the default location (
~/.ssh/id_ed25519), then enter a passphrase or press Enter to skip.Show the public key to copy it:
bashcat ~/.ssh/id_ed25519.pub
If you need the private key in PuTTY (.ppk) format:
bash
sudo apt install putty-tools
puttygen ~/.ssh/id_ed25519 -o ~/.ssh/id_ed25519.ppkAbout key types
Ed25519 is short, fast, and secure, and is recommended in most cases.
If your software does not support Ed25519, generate an RSA key:
bashssh-keygen -t rsa -b 4096 -m PEMIf older software (old PuTTY or WinSCP versions) cannot open the
.ppkfile, convert with PPK version 2: add--ppk-param version=2to theputtygencommand, or in PuTTYgen choose Key > Parameters for saving key files... > PPK file version =2before saving.
Use SSH Keys with FlashPanel
Once you have a public key, add it to FlashPanel in one of two ways:
- Global SSH Keys: tied to your account and automatically added to every new server.
- Server SSH Keys: added for a specific system user on an existing server.
Then log in with the matching private key, for example:
bash
ssh -i ~/.ssh/id_ed25519 flashpanel@SERVER_IPServer SSH Key
Besides your own SSH Key, each server has its own SSH key pair, created by FlashPanel during setup. The server uses this key to pull code from private Git repositories (GitHub, GitLab, Bitbucket...), for example when deploying a website.
To add the server's public key to your Git account:
- Open the server's Home page and, in the Utilities group, click Add Server SSH Key.
- Select the connected Git accounts and click Submit.
- For providers that don't support adding keys automatically, click the copy button for Server Global SSH Key and add it yourself on the provider's SSH key page shown in the hint.