PuTTY and a private key
To in to a server via SSH with PuTTY and a public key, perform the following steps:
- From the Windows Start menu, open the client.
- Navigate to the PuTTY Key Generator interface.
- Under the Actions heading, click Generate. PuTTY will generate the key and display the result under the Key menu.
- Copy the public key and paste it in the
.ssh/authorized_keys
file. - Enter a passphrase in the Key passphrase and Confirm passphrase text boxes.
- Click Save private key and save the key as a
.ppk
file. - In the Session interface, from the Saved Sessions menu, select your preferred authorization session and click Load.
- Navigate to the Auth interface under the SSH category.
- Click Browse, select the private key file to upload, and click Open.
- Navigate to cPanel's Manage SSH Keys interface ( Home >> Security >> SSH Access >> Manage SSH Keys) and import the server's keys.
MacOS or Linux
To log in to your MacOS or Linux server via SSH, perform the following steps:
- Open a terminal session.
-
Run the following command:
ssh -p port user@IP
Note:
In the above command:
port
represents the port number.user
represents your username.IP
represents your IP address.
Manage SSH keys
This section of cPanel's SSH Access interface allows you to create, import, manage, and remove SSH keys. The system will use these keys when you confirm that a specific computer has the right to access your website’s information with SSH.
Generate a New Key
Use this section of the interface to create new SSH key pairs, which include a public key and a private key.
To generate a new SSH key pair, perform the following steps:
- Click Manage SSH Keys.
- Click Generate a New Key.
- To use a custom key name, enter the key name in the Key Name (This value defaults to id_rsa): text box.
- Enter and confirm the new password in the appropriate text boxes.
- Select the desired key type.
- DSA keys provide quicker key generation and signing times.
- RSA keys provide quicker verification times.
-
Select the desired key size.
-
Click Generate Key. The interface will display the saved location of the key.
Import Key
To import an existing SSH key, perform the following steps:
-
Click Manage SSH Keys.
-
Click Import Key.
-
To use a custom key name, enter the key name in the Choose a name for this key (defaults to id_dsa) text box.
-
Paste the public and private keys into the appropriate text boxes.
- Click Import.
Manage your keys
The Public Keys and Private Keys tables display the following information about your existing keys:
Column
|
Description
|
---|---|
Name | The key's name. Public and private keys use the same key name. |
Authorization Status |
Whether you authorized the key. Important: You must authorize new keys before you attempt to use them. Note: This column only displays in the Public Keys table. |
Actions |
You can perform the following actions:
|