SSH (Secure Shell) is a secure protocol that allows encrypted file transfers and remote logins over the internet. When using SSH, all communications — including login credentials and commands — are encrypted, making it a safe and efficient way to manage your server.
In cPanel, you can easily generate, import, and manage SSH keys for passwordless authentication and improved security.
SSH keys offer a more secure alternative to password-based logins. Instead of typing your password every time, you authenticate using a private key stored on your local machine and a public key installed on the server.
Because the private key is never sent over the internet and cannot be easily guessed, SSH key authentication is highly resistant to brute-force attacks.
Log in to your cPanel account.
Navigate to the Security section.
Click Manage SSH Keys.
Under Generate a New Key, click Generate a New Key.
Enter a key name (optional), choose a key password (recommended), and select the key type and size (defaults are fine for most users).
Click Generate Key to complete the process.
Your public and private key pair will be created. The public key is stored on the server; the private key remains securely on your computer.
SSH key authentication works like a lock-and-key mechanism:
The public key is installed on the server.
The private key stays on your computer.
When you attempt to connect, the server checks if your private key matches the authorized public key. If they match, access is granted — no need to enter a password.
Import Existing Keys:
If you already have a public/private key pair, click Import Key in the SSH Keys section to upload them.
Use with PuTTY (Windows users):
If you use PuTTY as your SSH client:
Convert the private key to .ppk
format using PuTTYgen.
You can download your private key from cPanel and import it into PuTTYgen.
Alternatively, in cPanel, under your private key, click View/Download to get the .ppk
version directly.
Manage/Delete Keys:
In the SSH Keys interface, you can authorize, deauthorize, or delete keys as needed for better access control.
For enhanced automation and security, use SSH key authentication instead of passwords — especially for routine tasks, file transfers, or remote access via scripts.