Hi, This is my very first post in this platform. I would like to show you guys today the way you can access your cpanel without password and by setting the ssh just once! and after then by using your development machine you'll be able to login to your cpanel and access the full system without any password or any other credentials. So let's just rock it.
I had previously did this same thing 2-1 years back. But I forgot now. and didn't find any good article where the process mentions properly, That's why I was messing with it for few hours and finally figured and so thought to share with you. hopefully, you'll like this post.
The very first thing is we need to open up your git bash terminal or any other bash terminal you've then
to do this follow this article Generating a new SSH key
(Also don't forget to add that to ssh agent like it showed on that article)
When you're done with creating the ssh key pair we're almost 50% done. now follow the next
go to your cpanel and login into it. now find out the Security tab where you'll get a option like SSH Access
Note: When you're on a fresh cpanel, this might not be enabled. so contact your cpanel provider and ask them to enable so you can access to cpanel via SSH.
Now you'll get some fields that needs to be filled out with the information that you've generated to your development machine
and that's it! you've added your local generated ssh key pair to the cpanel where you want to access the panel without any password or security credentials.
Now get back one step and then you'll be able to see the list of key pair you've and also you'll see the one we imported right away. You'll see something like this
click on the manage button on the right side. and then it will take you to here
Now you've to click on the authorize button. and that's it. we're done!
You have successfully added your local SSH key to server
If you don't know yet how to login then now?
That's super easy as well. You know the username and password of your hosting from there you'll have to use the username only and the domain name. that's it!
you need to do one more thing for that and that is save the private key to
ssh config file so that it detect every time you want to access this server and use that key against of the host. so for that create or open the
~/.ssh/config like so. and then you have to add identityFile like this way.
Note: You can add as many identityFile you want to
in my case it was
~/Downloads/soci***pector_io_rsa this. If you do save this config then you're done.
That's it for today I work as a Full-Stack engineer for around 4 years. but didn't write any article to any platform this is my first post here. Pardon if any mistake happens
Thank you so much for reading this post. if you find this helpful then spread it.