What is an SSH key?
SSH is a safe way to control a server by typing commands. An SSH key is like a special key and lock pair. The private key stays on your own computer. The public key goes onto the server. When they match, the server lets you in. The private key must never be shared.
This guide needs root access for the server. VPS and dedicated server owners have this.
Before you start
- You need a key pair already made, for example with PuTTYgen or the
ssh-keygencommand. - Open the key files in a plain text editor, such as Notepad.
- Know the passphrase of the key if it has one. A passphrase is an extra password that protects the key.
Steps
- Log in to WHM as root.
- Type Manage root's SSH Keys in the search box. In some versions it is under Security Center.
- Click it to open.
- Click Import Key.
- In Choose a name for this key, type a name such as
my-laptop. If you leave it blank, WHM usesid_dsaorid_rsa. - In Paste the private key, paste the full private key text.
- If the key has a passphrase, type it. If not, leave it empty.
- In Paste the public key, paste the public key text.
- Click Import.
WHM saves the key pair and shows a success message.
Authorize the key
An imported key is stored, but it is not yet allowed to log in. You need to authorize it.
- Go back to Manage root's SSH Keys.
- Find your key in the list.
- Click Manage Authorization.
- Click Authorize.
Test the login
Open your SSH program, choose your key and connect. If it fails, check that SSH access is allowed in your server's firewall, and ask Hostvento support for the right port.
Quick recap
- An SSH key lets you log in without a password.
- Use Import Key in WHM and paste both keys.
- Click Authorize afterward.
- Keep your private key secret.