Access via the SSH protocol using SSH keys. Generating SSH keys in the cPanel control panel.

To receive access via the SSH protocol using the SSH keys, we will need to generate those SSH keys.

  1. Go to the cPanel control panel of your account and create ‘Private Keys’ and ‘Public Keys’. Generate SSH keys in the SSH Access section:
  2. Check the authenticity for the public key (option ManageAuthorize):
  3. Download ‘Private Keys’ to the directory on your PC. By default, there should be /home/user_name/.ssh/id_rsa.
    1. Go to the given directory and set the rights to the id_rsa 600 file:

    $ cd /home/user_name/.ssh/

    $ chmod 600 id_rsa

    Next, execute the command:

    $ ssh-add id_rsa

    And then insert our password which we generated when creating ‘Private Keys’ and ‘Public Keys’

    1. Connect to our server:

    $ ssh username@host

    And the password is not requested any more

    If you have Windows OS installed on your computer, you need the PuTTY program to connect via SSH

    You can download this program here.

    Do the two steps listed above, and download the ‘Private Keys’ file to your computer. 

    Run the PuTTY program. 

    Specify the IP address in the Host field and the standard port 22. 

    In the SSH connection setting, specify the way to the private key: 

    Connection → SSH → Auth → Private_key_for_Authentification → private.key

    Next, go back to the Session section and save the settings by default with the Save button. 

    After the connection, insert the login and password which you’ve generated when creating ‘Private Keys’ and ‘Public Keys’ if necessary. 

Was this answer helpful? 0 Users Found This Useful (0 Votes)