How to use SSH to connect to a Linux terminal on your web hosting service

Source: Tom's Hardware added 07th Dec 2024

  • how-to-use-ssh-to-connect-to-a-linux-terminal-on-your-web-hosting-service

Whether you’re trying to run a Bash script, have a look at what processes are running or just move files around, you need to get to the terminal / command prompt on your web hosting plan. Most of the best web hosting plans give you access to the Linux terminal, but require you to use an SSH (Secure Shell) connection to log into it from your PC.

In order to connect from your computer via SSH, you need to first create a public / private key combination and download the private key file. Then you can use both the private key file and a passkey (aka password) in an SSH client such as Putty to establish the connection. Below, we’ll show you how it’s done.

How to SSH to your web hosting server

Note that these instructions assume that your web hosting plan uses cPanel as its control panel. Some plans use other control panels which will have similar, but not identical interfaces.

1. Navigate to your control panel and log in. Usually, the control panel type is cPanel and the login is at https://www.yoursite.com/cpanel.

2. Click SSH Access.

(Image credit: Tom’s Hardware)

3. Click Manage SSH Keys.

(Image credit: Tom’s Hardware)

4. Click Generate a New Key.

Get Tom’s Hardware’s best news and in-depth reviews, straight to your inbox.

(Image credit: Tom’s Hardware)

5. Give the key a name (“id_rsa” is usually the default) and enter a password. Then click Generate key.

(Image credit: Tom’s Hardware)

6. Click Go Back.

(Image credit: Tom’s Hardware)

7. Click Manage next to the Public key.

(Image credit: Tom’s Hardware)

8. Click Authorize and then Go Back.

(Image credit: Tom’s Hardware)

9. Click View/Download next to the private key.

(Image credit: Tom’s Hardware)

10. Click Convert under Convert to PPK format. If it’s not automatically filled in, you will need to enter the password you used to create the key.

(Image credit: Tom’s Hardware)

11. Click Download Key.

(Image credit: Tom’s Hardware)

A PPK file downloads to your computer. Store it somewhere where you won’t lose it.

12. Launch Putty. Download and install it if you don’t already have it installed.

13. Enter the hostname and SSH port number. You’ll get these from your provider. If you have your own domain the hostname would be your domain name.

(Image credit: Tom’s Hardware)

14. Under Connection->SSH->Credentials, click the Browse button under Private Key file and select the PPK file you downloaded.

(Image credit: Tom’s Hardware)

15. Optional: save your hostname. Under the Session tab, give your session a session name (ex: “mysite”) and hit Save. This will allow you to load the hostname and path to the PPK file. So next time you open Putty, you can hit the sitename and hit load.

(Image credit: Tom’s Hardware)

16. Click Open.

(Image credit: Tom’s Hardware)

17. Click Accept if prompted. This happens the first time you log in to a new site.

(Image credit: Tom’s Hardware)

18. Enter your username and passphrase. The username is the same one you used to log into cPanel, but the passphrase / password should be the one that you used to create the public / private key.

(Image credit: Tom’s Hardware)

You should then get the terminal prompt. Save the PPK file because, if you have it, you don’t need to recreate it, each time you want to connect, just the first time.

Read the full article at Tom's Hardware

media: Tom's Hardware  

Related posts


Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Related Products



Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91