FTP & SSH Access

How to Set Up SSH Key Authentication for Your Hosting Account

SSH keys are a safer, more convenient alternative to password logins for your server. Instead of typing a password (which can be guessed or brute-forced), you use a matched pair of cryptographic keys. It is both more secure and, once set up, quicker to use.

New to SSH? Our guide on logging in to your Linux server using PuTTY covers the basics of connecting.

How SSH keys work

You create two keys: a private key that stays secret on your computer, and a public key you place on the server. The server trusts anyone holding the matching private key — no password needed.

Step 1: Generate a key pair

On Mac or Linux, open a terminal and run:

ssh-keygen -t ed25519 -C "your@email.com"

On Windows, use PuTTYgen (included with PuTTY) and click Generate. Save both keys, and protect the private key with a passphrase.

Step 2: Add the public key in cPanel

  1. Log in to cPanel and open Security → SSH Access.
  2. Click Manage SSH Keys, then Import Key.
  3. Paste your public key and save.
  4. Click Manage beside the key and choose Authorize.

Step 3: Connect with your key

Point your SSH client at the server using your private key. You can also access a shared hosting account via SSH once keys are in place. For extra safety, consider changing the default SSH port on a VPS.

Frequently asked questions

Are SSH keys really safer than passwords?

Yes. A strong key is effectively impossible to brute-force, unlike a password. Add a passphrase to your private key for another layer.

Can I use the same key on multiple servers?

Yes — place the same public key on each server. Keep the private key protected, since it unlocks them all.

SSH access is not enabled on my account.

SSH may be off by default on some shared plans. Contact support to have it enabled for your account.

Was this article helpful?