Menu

SSH Key Management

Updated on July 7th, 2021

Flywheel uses SSH keys to authenticate connections to our SSH gateway. This article will explain how to view existing keys, generate new ones, and use them on Flywheel.


Table of Contents:

1. What is an SSH key?
2. Checking for existing SSH keys
3. Generating new SSH keys on Mac/Linux
4. Generating new SSH keys on Windows
5. Adding SSH keys to Flywheel


What is an SSH key?

To establish a secure connection between the client (your computer) and the remote server (your Flywheel sites), you must first be authenticated. SSH keys are the method of authentication Flywheel uses, because they provide the best secure encryption.

SSH keys come in pairs – a public key and a private key. The private key is kept on the machine you are authenticating from and the public key is added to Flywheel.


Checking for existing SSH keys

SSH keys are typically stored in the ~./ssh folder on your machine. To check if you already have an SSH key pair, you can look in that directory and see if there are any files by opening up a terminal and typing this command:

cd ~/.ssh; ls

If you see a pair of files named something like id_ed25519 and id_ed25519.pub (or id_rsa), then you already have a key pair and can continue on to adding and deleting keys on Flywheel. If there isn’t a key pair listed, you’ll need to generate one.


Generating new SSH keys on Mac/Linux

Follow these steps to generate a new SSH key pair:

  1. Open up your terminal program of choice (like Terminal or iTerm for Mac).
  2. Use the ssh-keygen command to generate a new pair:
    ssh-keygen -a 100 -t ed25519
    Generating public/private ed25519 key pair.
    Enter file in which to save the key (/Users/username/.ssh/id_ed25519):
    

    Note

    If creating SSH keys for use with GitHub Actions you will need to substitute rsa for ed25519 in order to convert to PEM format.

  3. Press enter to accept the default location and file name, or enter your preferred location and name.
  4. Enter a passphrase when prompted.
  5. Voila! You’re ready to copy the public key and paste it into the Flywheel dashboard.

Generating new SSH keys on Windows

Windows users can generate SSH keys using PuTTYgen. For more information, check out this help article:

Connecting to Flywheel’s SSH gateway using PuTTY


Adding SSH keys to Flywheel

Once a key pair has been generated, it’s time to add the public key to the Flywheel dashboard!

  1. First you’ll need to copy the public key to your clipboard. We have used “id_ed25519” for the example here, please adjust for your setup.On MacOS:
    pbcopy < ~/.ssh/id_ed25519.pub

    On Windows and Linux:

    cat ~/.ssh/id_ed25519.pub and copy the terminal output
  2. Next, head over to the SSH page in the Flywheel dashboard and click the blue “plus” button on the top right of the SSH Keys card.
  3. Enter a name for your key. A common convention is to use the name of the machine that the key exists on (for example, Trevan’s MacBook Pro)
  4. Paste the key you copied in step 1 into the text field.
  5. Click the green “Add Key” button.

You’re now ready to connect to your sites via SSH!


Still need help?

If you have any questions about accessing your sites via SSH, please reach out to our friendly Happiness Engineers!

Was this article helpful?

Getting Started

New to Flywheel? Start here, we've got all the information you'll need to get started and launch your first site!

View all

Account Management

Learn all about managing your Flywheel user account, Teams and integrations.

View all

Billing

Everything about billing, invoices and payments can be found here.

View all

Features

Flywheel hosting plans include a ton of great features. Learn about how to get a free SSL certificate, set up a staging site, and more!

View all

Platform Info

All the server and setting info you'll need to help you get the most out of your Flywheel hosting plan!

View all

Site Management

Tips and tricks for managing your sites on Flywheel, including going live, troubleshooting issues and migrating or cloning sites.

View all

Growth Suite

Learn more about Growth Suite, our all-in-one solution for freelancers and agencies to grow more quickly and predictably.

View all

Managed Plugin Updates

Learn more about Managed Plugin Updates, and how you can keep your sites up to date, and extra safe.

View all

 

Flywheel help

Help is just a click away! Log into the Flywheel dashboard to instantly chat with an expert, open a ticket, or follow along with in-depth documentation. We happily offer support 24 hours a day, 7 days a week, 365 days a year!

Log in

Try Flywheel today

Launch your next WordPress site in minutes.

 Free migrations  24/7/365 support  14‑day demo sites