Hello friends I hope your are doing well, Today We’ll talk about How to access shared hosting account with SSH. If you are good in command line then better to use SSH it gives you more control over your server and you can execute commands and task more frequently and fast.
I faced one trouble that’s why i need to access shared hosting via SSH, I have to import 800MB database in mysql which I tried uploading via http port but failed. So I thought I should import mysql database via command line threw SSH. I already have shared tutorial to exporting and importing mysql database via command line.



You can also do lot more things like copying files from local to server using SSH and many more things which allowed by shared hosting server like godaddy, hostgator etc.

How to access shared hosting account with SSH

Step-1: First you have to create SSH key. For generation SSH key read this article.
How to generate SSH key pair and configure on github
Avoid github configuration part on above article for now.

Step-2: If you have generated SSH key (public key & private key) successfully, time to configure in your shared hosting account.



Step-3: login into your shared hosting cpanel. and find “SSH Access” under Security tab.
ssh-access

Step-4: Enable SSH access and import your local ssh private and public key on server.
For E.g.: Go to command line and and open private and public key via vim/nano editor.
Private key

vim .ssh/id_rsa

ssh-access-1

ssh-access-2

As same you can access public key and add both the keys on shared hosting server.

vim .ssh/id_rsa.pub

ssh-access-3

Step-5: All done, access shared server via SSH, Open terminal and type
ssh [email protected]_ip

You can see your server ip address in your control panel or just ping your server and see ip address.

If you are able to access your server via ssh, Now you can do anything by command line.

If you like this post please don’t forget to subscribe my public notebook for more useful stuff