SSH keys allow you to log in to your server without a password. They are more secure than password-based login and recommended for regular SSH users.
Step 1 — Generate an SSH key in cPanel
- Log in to cPanel.
- Under the Security section, click SSH Access.
- Click Manage SSH Keys.
- Click Generate a New Key.
- Fill in the key name (or leave the default id_rsa), set a strong passphrase, and click Generate Key.
- Go back to Manage SSH Keys. Under Public Keys, find your new key and click Manage.
- Click Authorize to activate the key.
Step 2 — Download the private key
- Under Private Keys, click View/Download next to your key.
- Click Download Key and save the file to your computer.
Step 3 — Connect using your SSH key
On Windows (PowerShell / Windows Terminal):
- Move the downloaded private key to a safe location, e.g. C:UsersYourName.sshid_rsa.
- Connect with: ssh -i C:UsersYourName.sshid_rsa yourusername@yourdomain.com
On macOS / Linux:
- Move the key to ~/.ssh/id_rsa and set permissions: chmod 600 ~/.ssh/id_rsa
- Connect with: ssh -i ~/.ssh/id_rsa yourusername@yourdomain.com
Using an existing local key (advanced)
If you already have an SSH key pair on your computer, you can upload the public key (.pub file) instead. In cPanel → SSH Access → Manage SSH Keys, click Import Key and paste your public key content.