Learn About SSH Keys, How To Set Them Up, & Use Them Via The Shared Web Hosting Control Panel

Quick Intro

SSH Keys is a secure option that gives you access to different areas, even to a remote machine. For example, in our case, you can connect to your user's Web Control Panel via your local machine Terminal.

Important To Know Before You Begin

To access the Web Hosting from the local Terminal, you must generate the SSH Key on your local machine that you are connecting from, and paste the generated key into the Web Control Panel.

When you paste the SSH Key into the Web Control Panel, you may not see it in the Public Keys tab. They will be located in the Authorized Keys tab.

Creating A Local SSH Key (on your personal computer)

Creating a Git repository is not enough. You also need to generate an SSH Key using the device you are connecting from. In your case is the computer you are using.

The commands below could be used with UNIX-based systems only. Please, use guides around the internet if you need to connect using a Windows machine.

Open your local machine's Terminal. From there, enter the command: sudo ssh-keygen -t rsa -b 4096 (this command generates the id_rsa.pub file inside of the .ssh/ folder).

Once the SSH Key has been generated, navigate to the default SSH directory of any UNIX-based system, which is ~/.ssh/ by default. Enter the command: sudo cd ~/.ssh/

When you are inside of the .ssh/ folder, create a config file. You can do this by typing: touch config (without any extensions)
Now, let's open the config file and add the necessary information of our server. To open and edit the file, use nano. Type: nano config

Inside of the config file, add the following credentials:
Host server1.webhostmost.com
Port 2323
Save the file (Ctrl + O), and exit (Ctrl + X).

Now, let's open the id_rsa.pub file. It's the key file that we have generated using commands above. Open the file with content with cat. Type: cat ~/.ssh/id_rsa.pub

Copy the entire file's content.

Connecting Your Local Machine To The Git Repository Via Web Control Panel

Now, when you have the key content copied, you need to paste it inside the Web Panel.

From your Web Control Panel, navigate to Security Management > SSH Keys > Paste Key > Paste the key you've copied > Click Create See the Key in Authorized Keys tab.

Now, to connect via your local terminal, type the following command: ssh yourwebpanelusername@server1.webhostmost.com
Note: Your Web Panel Username has been sent to your email at your initial service purchase.


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