<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mahbub R</title>
    <description>The latest articles on DEV Community by Mahbub R (@mahbbrah).</description>
    <link>https://dev.to/mahbbrah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F13985%2F79269fd7-8b44-478e-81b9-087686e1b875.png</url>
      <title>DEV Community: Mahbub R</title>
      <link>https://dev.to/mahbbrah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mahbbrah"/>
    <language>en</language>
    <item>
      <title>Access Cpanel via SSH without password</title>
      <dc:creator>Mahbub R</dc:creator>
      <pubDate>Sat, 13 Jul 2019 06:01:00 +0000</pubDate>
      <link>https://dev.to/mahbbrah/access-cpanel-via-ssh-without-password-3e1b</link>
      <guid>https://dev.to/mahbbrah/access-cpanel-via-ssh-without-password-3e1b</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hi&lt;/strong&gt;, 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. &lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;The very first thing is we need to open up your git bash terminal or any other bash terminal you've then&lt;/p&gt;

&lt;h4&gt;
  
  
  1. First we have to generate SSH key pair from your development machine
&lt;/h4&gt;

&lt;p&gt;to do this follow this article &lt;a href="https://help.github.com/en/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent" rel="noopener noreferrer"&gt;Generating a new SSH key&lt;/a&gt;&lt;br&gt;
(Also don't forget to add that to ssh agent like it showed on that article)&lt;br&gt;
When you're done with creating the ssh key pair we're almost 50% done. now follow the next&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Now let's import the created SSH key to cpanel
&lt;/h4&gt;

&lt;p&gt;go to your cpanel and login into it. now find out the Security tab where you'll get a option like &lt;strong&gt;SSH Access&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftjofkc4dtdjiri20ergk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftjofkc4dtdjiri20ergk.png" alt="SSH Access Option click on it"&gt;&lt;/a&gt;&lt;br&gt;
Note: &lt;em&gt;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.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now get inside of that option and then you'll see something like that manage ssh keys click on it&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgvckskicui9k6njtrwx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgvckskicui9k6njtrwx.png" alt="manage ssh keys button"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you have to import the key that you've generated earlier. to do that click on that button&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fihqau8arkk32qd7dk1kx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fihqau8arkk32qd7dk1kx.png" alt="Import Key"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you'll get some fields that needs to be filled out with the information that you've generated to your development machine&lt;/p&gt;

&lt;p&gt;here is how it will look like&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhpo5zrz35iimvj1gnjo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhpo5zrz35iimvj1gnjo.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h4&gt;
  
  
  Final Step is to authorize the added key pair
&lt;/h4&gt;

&lt;p&gt;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&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuvij7zljpxyp6v30y911.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuvij7zljpxyp6v30y911.png"&gt;&lt;/a&gt;&lt;br&gt;
click on the &lt;strong&gt;manage&lt;/strong&gt; button on the right side. and then it will take you to here&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fk9y261y2pmij4wdofc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fk9y261y2pmij4wdofc.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you've to click on the authorize button. and that's it. we're done!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You have successfully added your local SSH key to server&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you don't know yet how to login then now? &lt;br&gt;
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!&lt;br&gt;
example: &lt;code&gt;user_name@example.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;now open up your local computer bash terminal in my case it's git&lt;br&gt;
and type command like that below&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmrt98odhal5zln2roj9f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmrt98odhal5zln2roj9f.png" alt="type in terminal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have completed all the above step successfully then you are already entered to your cpanel without typing any password.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpkf2cg4ks12vvikgssbs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpkf2cg4ks12vvikgssbs.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Now to keep that configuration saved so you can use it after restarting PC
&lt;/h3&gt;

&lt;p&gt;you need to do one more thing for that and that is save the private key to &lt;code&gt;ssh&lt;/code&gt; 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 &lt;code&gt;config&lt;/code&gt; file &lt;code&gt;~/.ssh/config&lt;/code&gt; like so. and then you have to add identityFile like this way.&lt;br&gt;
&lt;code&gt;&lt;br&gt;
IdentityFile location_for_the_private_key&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Note&lt;/strong&gt;: &lt;em&gt;You can add as many identityFile you want to&lt;/em&gt;&lt;br&gt;
in my case it was &lt;code&gt;~/Downloads/soci***pector_io_rsa&lt;/code&gt; this. If you do save this config then you're done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That's it for today&lt;/strong&gt; 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&lt;/p&gt;

&lt;p&gt;Thank you so much for reading this post. if you find this helpful then spread it.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>bash</category>
      <category>git</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
