We log search terms to improve our documentation. For more information, read our Privacy Policy.
Managing SSH Keys and API Tokens
Last modified: 2026 September 16
Overview
Manage SSH keys and API tokens to give tools and scripts secure, developer-level access to your cPanel account.
- SSH (Secure Shell) is a network protocol that lets you connect to your server over an encrypted command line connection.
- API tokens allow an application to authenticate with cPanel and run API functions on your behalf. Use API tokens for automated tools such as deployment scripts and continuous integration (CI) runners.
If you do not see these features, contact your hosting provider to enable them.
Manage SSH keys
To manage SSH keys, open the Security hub and select the Advanced tab. Then, scroll to the Terminal Access (SSH) section.
Generate a new SSH key pair
To create a new key pair on the server, perform the following steps:
- Click Generate Key.
- Enter a name for the key.
- Enter and confirm a passphrase. A passphrase protects your server if an attacker gains access to the key. This step is optional.
- Click + Generate Key.
Store your private key and passphrase in a secure location. Anyone who obtains your private key and passphrase can access your account.
Import an existing public key
If you already have a key pair, you can import the public key instead of generating a new one:
- Click Import Key.
- Paste your public key into the Public Key text box.
- Enter a name for the key.
- Click Import.
Delete a key
To permanently remove a key from your account, locate the key in the keys table and click the delete icon (). After you confirm, cPanel removes the key. You cannot recover a deleted key.
Manage API tokens
Treat an API token like a password. Anyone who has the token can perform actions as your account. There is no option to limit an API token to specific features.
To create and manage your API tokens, go to the Account Preferences interface, and click your avatar (
) icon in the upper-right corner of the header. Then, click Profile, select the Connections tab, and locate the API tokens section.
Create an API token
To create a new API token, perform the following steps:
- Click Create Token.
- Enter a name for the token. Use a name that identifies where you plan to use the token (for example Backup Script).
- Optionally, set an Expiration date. If you leave this blank, the token does not expire until you revoke it.
- Click Generate Token.
- Copy the access token to a secure location. cPanel displays the token value one time only. If you lose it, you cannot retrieve it and must create a new one.
- Click Done.
Revoke an API token
Revoke a token when you do not need it anymore or if you believe an attacker has accessed it. After you revoke a token, any tool that uses it can no longer authenticate.
To revoke an API token, perform the following steps:
- Locate the token in the tokens table.
- Click Revoke for that token.
- Click Revoke Token to confirm.