# How to set up SSH keys in cPanel

> SSH keys let you log in over SSH securely without a password. Here is what an SSH key is, why it is safer, and how to create one in cPanel.

Source: https://www.kualo.com/knowledgebase/dev-cli/how-to-set-up-ssh-keys-in-cpanel
Updated: 2026-06-11

---

An **SSH key** is a far more secure alternative to a password for logging in over SSH. Instead of a single secret you type in, a key comes as a matched pair: a **private key** that stays safely on your own computer, and a **public key** that you place on the server. When you connect, the two are checked against each other - so there is no password to be guessed, stolen, or brute-forced.

## Why use a key instead of a password?

- **Much harder to break** - a key is far longer and more complex than any password a person would choose, so it cannot realistically be guessed or brute-forced.
- **Nothing to type or remember** - once it is set up, you connect without entering a password each time.
- **You stay in control** - your private key never leaves your computer, and you can remove a public key from the server at any time to revoke that access.

For more on connecting over SSH, see [Using SSH on Kualo hosting](/knowledgebase/dev-cli/using-ssh-on-kualo-hosting-a-getting-started-guide).

## Manage your SSH keys in cPanel

Log in to cPanel and, in the **Security** section, click **SSH Access**, then **Manage SSH Keys**.

![The Manage SSH Keys page in cPanel](https://kb-cdn.kualo.com/4e/6c/4e6ce05a9cd831a0ee0800ef3a835a0a802d1171.png)

From here you can **generate** a new key pair on the server, or **import** a key you already have.

## Generate a new key

1. Click **Generate a New Key**.

   ![Generating a new SSH key in cPanel](https://kb-cdn.kualo.com/fc/c5/fcc5abc312854a371ae34800c16a890cbd19538a.png)

2. Give the key a name (or leave the default `id_rsa`), set a strong **Key Password**, and choose the **Key Type** (**RSA** is recommended) and **Key Size** (**2048** bits or higher - 4096 for extra strength).
3. Click **Generate Key**.

## Authorize and use the key

1. Back on the Manage SSH Keys page, find your new **public** key, click **Manage**, then **Authorize**. This tells the server to accept that key for logins.
2. Download the **private** key to your own computer and keep it safe - never share it. You then point your SSH client (or the `ssh -i` option) at it to connect.

:::tip
If you already created a key on your own computer, use **Import Key** instead and paste in just the **public** key - your private key should never leave your machine.
:::


---

_Source: Kualo Knowledgebase — https://www.kualo.com/knowledgebase/dev-cli/how-to-set-up-ssh-keys-in-cpanel · © Kualo Ltd._
