Connecting to the server with an SSH public/private key

Connecting to the server with an SSH public/private key

Instead of a password, you can connect to the server over SSH with a more secure key pair (public and private). The steps below create a key in cPanel and use it in PuTTY for Windows.

  1. Log in to cPanel (e.g. https://yourdomain.com/cpanel).

  2. In the Security section, click SSH Access.

    Connecting with an SSH key – step 1

  3. Click Manage SSH Keys.

    Connecting with an SSH key – step 2

  4. Click Generate a New Key.

    Connecting with an SSH key – step 3

  5. Enter a key password (Key Password), repeat it and click Generate Key. Remember the password – you'll need it in steps 9 and 13.

    Connecting with an SSH key – step 4

  6. Go back to the key list and click Manage next to the new public key.

    Connecting with an SSH key – step 5

  7. Click Authorize.

    Connecting with an SSH key – step 6

  8. Under Private Keys, click View/Download next to your key.

    Connecting with an SSH key – step 7

  9. In the section for converting the key to PPK format, enter the password from step 5 and click Convert.

    Connecting with an SSH key – step 8

  10. Click Download Key and save the .ppk file somewhere safe on your computer.

    Connecting with an SSH key – step 9

  11. Open PuTTY and enter your domain name or the server's IP address in Host Name. In the menu on the left, open Connection > SSH > Auth (in newer versions Auth > Credentials), click Browse and select the key you saved in step 10. Then click Open.

    Connecting with an SSH key – step 10

  12. When the window opens, enter your username – it's the same as your cPanel username.

    Connecting with an SSH key – step 11

  13. Enter the key password from step 5.

    Connecting with an SSH key – step 12

You're now connected to the server over SSH.

Tip: if you can't connect, check that SSH access is enabled for your hosting plan or contact our support team. On Linux and macOS, download the private key without converting it (the first Download Key button in step 8) and connect with ssh -i path/to/key username@yourdomain.com.

  • cloudlinux
  • cpanel
  • php
  • linux
  • mysql
  • centos

Hosting for Croatian businesses, on servers in Germany, with support in Croatian.

EXTREME HOSTING d.o.o.

Partner

Social media

Payment methods

American ExpressDiners Club InternationalVisaMaestroMasterCardDiscover

Bank transfer: IBAN HR1324840081135140481

All prices are shown in euros. Orders are completed on xhosting.hr.