SSH is an easy and secure way to remotely manage your site! This article contains all the necessary information to generate an SSH key, add an SSH key to Flywheel, and connect to SSH.
SSH (secure shell) is a secure login to a system with a way of encrypting your network connection so that you can work securely and remotely from any device. SSH allows you to connect directly from your laptop or computer to a site on a remote server. When connected via SSH, you are able to interact with remote sites using command line tools, this gives you more control and access to manage your sites as compared to an SFTP connection.
Flywheel’s SSH gateway uses keys to authenticate your connection to the servers and give access to users. 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.
SSH is typically used to securely transfer files and manage sites remotely via terminal access. With Flywheel’s SSH gateway, you can securely and efficiently manage all your WordPress® sites using command line tools.1
Once connected to a site, many tools and utilities are available to manage the site. Here are some of the most loved terminal tools that are installed by default:
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.
Follow these steps to generate a new SSH key pair:
ssh-keygen
command to generate a new pair:
ssh-keygen -a 100 -t 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.
Windows users can generate SSH keys using PuTTYgen.
Although modern versions of Windows (such as Windows 10) support OpenSSH, not all of them do. Don’t worry, if you’re running an older version of Windows you can still connect to Flywheel’s SSH Gateway using PuTTY!
PuTTY is a free SSH access client, and PuTTYgen is its corresponding SSH key generation tool.
If you haven’t yet, you’ll want to install PuTTY and PuTTYgen.
To connect to Flywheel’s SSH Gateway, you’ll need to install a public key on Flywheel and configure a private key in PuTTY. You can generate the keys you need in PuTTYgen.
Next, you’ll take the public key you copied to your clipboard and add it to your Flywheel account.
Next, you’ll want to configure the gateway. We recommend saving the session for future use, so you don’t have to configure PuTTY again next time.
If everything was set up correctly, you will now be able to connect to Flywheel’s SSH Gateway via PuTTY!
Once a key pair has been generated, it’s time to add the public key to the Flywheel dashboard!
pbcopy ~/.ssh/id_ed25519.pub
On Windows and Linux:
cat ~/.ssh/id_ed25519.pub
Copy the terminal output
Trevan’s MacBook Pro
)You’re now ready to connect to your sites via SSH!
Once your public key has been added, you can now connect to your sites via SSH!
ssh ssh.getflywheel.com
The authenticity of host 'ssh.getflywheel.com (11.111.111.11)' can't be established. RSA key fingerprint is SHA256:gGoHM/YYEKoCOrbrO/o0ZU1fndq8wz+KkkR8ePc8t5g. Are you sure you want to continue connecting (yes/no/[fingerprint])?
Type yes
to continue connecting.
Welcome To The Flywheel SSH Service Select your destination... 1 : Super Fly (flytrevan/super-fly) 2 : High Flyers (jhobbs/high-flyers) 3 : Rad Enough (flytrevan/rad-enough) 4 : Bozingo's Gadgets (flytrevan/bozingos-gadgets) 5 : Flyer's Club (atrabold/flyers-club) 6 : Awesome Opposums (trevannonadmin/awesome-opposums) 7 : Flippy's Martial Arts (trevsclient/flippys-martial-arts) 8 : Trusty Robots (trevsclient/trusty-robots) 9 : Full Plastic Jacket (flytrevan/full-plastic-jacket) 10 : Tank's Mobile Service (trevsclient/tanks-mobile-service) flytrevan@flywheel
Type the number next to the site you wish to view.
You should now be connected to the site you selected!
The instructions above outline connecting to the SSH gateway and viewing a list of all sites that you can then connect to. You can also connect directly to a site using the following syntax:
ssh [email protected]
For example:
ssh [email protected]
Your username can be found on your profile page, and the site-slug can be found at the end of the URL (after the site owner’s username) when viewing a site in the Flywheel dashboard.
To connect to a staging site, the syntax is:
ssh [email protected]
For example:
ssh [email protected]
To connect to a site owned by an Organization, the syntax is:
ssh [email protected]
For example:
ssh [email protected]
The Organization’s username can be found before the site slug in the URL when viewing the site in the Flywheel dashboard.
To connect to a staging site of an Organization owned site, the syntax is:
ssh [email protected]
For example:
ssh [email protected]
If you’re unable to connect, try specifying your identity file:
ssh -i /path/key-filename ssh.getflywheel.com
For example:
ssh -i ~/.ssh/id_ed25519 ssh.getflywheel.com
Here are a few notable items that aren’t currently available with Flywheel’s SSH gateway:
Viewing a history or real-time stream of site logs is not currently possible with Flywheel’s SSH gateway. Site logs can still be downloaded from a site’s Advanced page in the Flywheel dashboard though!
Our SSH gateway utilizes temporary servers that are spun up when you connect to SSH and spun down when you disconnect. Due to this, if you install a terminal package it will only be persisted the next time you connect to SSH if it’s been less than 5 hours since the last time you disconnected. You can always reinstall the package though!
There are a few WP-CLI commands that aren’t supported on Flywheel. More detailed information can be found in this article.
Similar to our SFTP offering, core WordPress files (including wp-config.php) are not editable.
If you have any questions about accessing your sites via SSH, please reach out to our friendly Happiness Engineers!
New to Flywheel? Start here, we've got all the information you'll need to get started and launch your first site!
View allLearn all about managing your Flywheel user account, Teams and integrations.
View allFlywheel 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 allAll the server and setting info you'll need to help you get the most out of your Flywheel hosting plan!
View allTips and tricks for managing your sites on Flywheel, including going live, troubleshooting issues and migrating or cloning sites.
View allLearn more about Growth Suite, our all-in-one solution for freelancers and agencies to grow more quickly and predictably.
Getting started with Growth Suite
Growth Suite: What are invoice statuses?
Growth Suite: What do client emails look like?
Learn more about Managed Plugin Updates, and how you can keep your sites up to date, and extra safe.
Restoring Plugin and Theme Management on Flywheel
Managed Plugin Updates: Database upgrades
Managed Plugin Updates: Pause plugin updates
We can help! Check out our Brand Resources page for links to all of our brand assets.
Brand Resources