Ultra Web Hosting Docs

SSH Keys

SSH keys let you connect to your account over the command line without typing a password, and they are far more secure than passwords alone. This guide covers generating a key pair in cPanel, authorizing it, downloading the private key, and connecting with it.

Why Keys Beat Passwords

An SSH key pair is made of two parts: a public key that lives on the server and a private key that stays on your computer. When you connect, the two are matched cryptographically.

Generating a Key Pair

  1. Log into cPanel.
  2. Go to SecuritySSH Access, then click Manage SSH Keys.
  3. Click Generate a New Key.
  4. Give the key a name (or accept the default id_rsa) and set a strong passphrase. The passphrase protects the private key if it is ever copied.
  5. Choose a key type and size (RSA 4096 is a solid default) and click Generate Key.
Tip Always set a passphrase. It is the difference between a stolen key file being useless and being a full account compromise.

Authorizing the Public Key

A newly generated key is not active until you authorize its public half:

  1. Back on the Manage SSH Keys page, find your new key under Public Keys.
  2. Click Manage next to it.
  3. Click Authorize.

The key now shows as authorized, which means the server will accept connections signed by the matching private key.

Downloading the Private Key

  1. Under Private Keys, click View/Download next to your key.
  2. Click Download Key and save the file to your computer, typically into your ~/.ssh/ folder.
Warning Treat the private key like a password. Never email it, never commit it to a repository, and never share it. Anyone who holds the private key and its passphrase can log into your account.

Converting the Key for PuTTY

On Windows, the popular PuTTY client needs the key in its own .ppk format:

  1. Open PuTTYgen (installed alongside PuTTY).
  2. Click Load, change the file filter to All Files, and open the private key you downloaded.
  3. Enter the passphrase when prompted.
  4. Click Save private key to write out a .ppk file.
  5. In PuTTY, point Connection → SSH → Auth at that .ppk file when you connect.

Connecting Without a Password

With the key authorized and downloaded, connect from a terminal on macOS, Linux, or Windows using your cPanel username and the server's hostname on port 22:

ssh -i ~/.ssh/id_rsa [email protected]

You will be asked for the key's passphrase (not your account password) the first time. SSH connects as the cPanel user on port 22. Replace cpuser with your cPanel username and server.example.com with your server hostname.

Note For a broader walkthrough of enabling SSH access and finding your server hostname, see SSH Access in the developer section.