Logging In Via SSH

ssh_keys_tw

With our WordPress hosting, you can login via SSH to your account’s shell (/bin/bash).

Using SSH to manage files, execute certain commands, etc. is extremely easy and efficient. It can often be used for many tasks that would normally be done via FTP where SSH would really be much faster and easier.

We do not allow username/password SSH logins and it may give you an error like this:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

To login via SSH, you need to use an SSH key.

1. Generate an SSH Key

Login to your cPanel for your domain. It is just http://www.domain.com/cpanel/ where you’ll replace the “www.domain.com” part with your own, registered domain used on your hosting account with us.

1

Once you’ve logged into cPanel, under Security go to SSH Access. Then click on the Manage SSH Keys button. And then click on the Generate New SSH Key button accordingly which will take you to a screen where you will fill in all the details for the new SSH key you are about to create.

Basically leave all the settings at their defaults and just fill in a password and reenter the password for the public key. When you’re done, click the Generate Key button to generate it and you’ll get a confirmation that it has been created.

Click Go Back, then you’ll see the new key in the list of Public Keys and it will show Not Authorized. So just click the Manage link on the right-hand side of the key and then click Authorize to authorize the SSH key accordingly.

2. Download the SSH Key

To download the key, go to SSH Access under Security section in cPanel.

For your SSH key you generated in step 1 above, a public key and a private key was generated. Under Private Keys, click View/Download for the key you just generated in step 1. On the next screen, the key will be displayed to you so just click the Download Key button below the key display.

2

If you want to use the SSH key with Putty, you need a PPK format. Under the Download Key button there is the feature in cPanel to convert the key to PPK format. So fill in the passphrase you set on the SSH key in step 1 and then click the Convert Key button to convert the format.

3. Save SSH Key and Set Permissions

Put the key somewhere on your computer where you can easily find it, may it be from an application or from command line.

The key may not have the right permissions and you’ll get the following error message:

WARNING: UNPROTECTED PRIVATE KEY FILE!

Permissions 0644 for ‘id_rsa’ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key “id_rsa”: bad permissions
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

So make sure that the key is 0600. To do that, you can CHMOD the file. See instructions on how to set file permissions on MacOS for example.

4. Login with SSH Key

4.1. Login via Command Line/Terminal

If you are using the command line or terminal, you’ll use the SSH command.

ssh -i id_rsa username@domain.com

So do the SSH command and the -i parameter indicates that you’re using a key file. Change the id_rsa part to the name of your SSH private file name. And change username to your cPanel username for your hosting account as well as domain.com to your domain which is being used on the hosting account.

4.2. Login via Putty

If you want to login via SSH using Putty or a similar telnet type of application, you can use the PPK file format as mentioned in step 2.

Open Putty, under Connection click SSH, then Auth.

authorizing putty

Click Browse under Private key file for authentication, then select the private key you downloaded in the last section, and click Open. Click Session and under port enter: 2222 . For the Host Name, enter your domain name, or shared IP address,then click the Open button to connect. If you see a PuTTY Security Alert, click Yes.

Host key is not cached message

You will see “Login As“. Please enter your cPanel username and then hit Enter. Then, enter the password for your key file and hit enter. For security reasons, PuTTY will not show anything when you type your password, this is normal. You will then be logged into your account via SSH.

Shares

Earn Money by Referring People

Refer customers to us with your affiliate link and earn commission on sales from your link.

Get Started

Pin It on Pinterest

%d bloggers like this: