Overview
This guide covers how to generate SSH keys outside of cPanel using your computer's built-in tools or third-party software. This is an alternative to generating keys directly in cPanel and achieves the same result — the choice comes down to personal preference.
Note: If you are not familiar with command line tools, we recommend generating your SSH keys directly in cPanel instead. See our guide: How To Connect To Your Website via SSH/SFTP
Once you have generated your keys using either method below, you will need to import your public key into cPanel and authorize it before you can connect. The steps for doing that are covered in Part 2: Generate SSH Keys in cPanel of the main SSH/SFTP guide linked above.
Part 1: Mac / Linux (Using Terminal)
Step 1: Check for an Existing Key
Before generating a new key, check if you already have one. Open Terminal (found in Utilities on Mac) and type:
cd ~/.ssh
Then type:
ls -l
If you see a file called id_rsa.pub you already have a public key. Copy it to your clipboard with:
pbcopy < id_rsa.pub
Then skip to the Import Your Key Into cPanel section of the main SSH/SFTP guide.
Step 2: Generate a New Key
If you don't have an existing key, generate one with the following command in Terminal:
ssh-keygen -t rsa -C "youremail@example.com"
Using your email address helps you identify the key later.
Note: This will create two keys, a public key and a private key. You will add the public key to cPanel. The private key stays on your computer and is used to authenticate your connection.

Step 3: Copy Your Public Key
Once generated, copy your public key to your clipboard:
pbcopy < ~/.ssh/id_rsa.pub
You are now ready to import your public key into cPanel. See the Import Your Key Into cPanel section of the main SSH/SFTP guide.
Part 2: Windows (PC) Using PuTTYgen
Step 1: Download and Install PuTTYgen
Download PuTTYgen and install it on your computer.
Step 2: Generate Your Key
Open PuTTYgen and click the Generate button. Move your mouse randomly over the blank area to generate randomness for the key.

Step 3: Save Your Keys
Once the key generates:
- Add a comment in the Key comment field to help identify the key, for example your name or computer name
- Click Save public key and save it somewhere you can easily find
- Click Save private key and save it in the same location
Important: Remember where you saved your private key; you will need it later when connecting via FileZilla or an SSH client.

Step 4: Copy Your Public Key
Highlight all the text in the box at the top of PuTTYgen that says "Public key for pasting into OpenSSH authorized_keys file" and copy it (Ctrl+C).

You are now ready to import your public key into cPanel. See the Import Your Key Into cPanel section of the main SSH/SFTP guide.
Import Your Public Key Into cPanel
Once you have your public key — whether generated on Mac or PC — you need to import it into cPanel and authorize it before you can connect.
Follow the steps in Part 2: Generate SSH Keys in cPanel of our main guide, starting at Step 2: Manage SSH Keys and choosing Import Key instead of Generate a New Key: How To Connect To Your Website via SSH/SFTP
Need More Help?
If you run into any issues our support team is available 24/7. Simply open a support ticket or use the live chat in your client area.