<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Untitled Publication]]></title><description><![CDATA[Untitled Publication]]></description><link>https://shyam-dadhaniya.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 24 Jun 2026 06:39:38 GMT</lastBuildDate><atom:link href="https://shyam-dadhaniya.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to use multiple git-hub accounts in a single system using SSH key in LINUX/UBUNTU]]></title><description><![CDATA[The majority of developers could find it necessary to operate many GitHub accounts on a single computer. On the same machine, for instance, you might run both your personal projects' GitHub account and the account for your organization.
It only takes...]]></description><link>https://shyam-dadhaniya.hashnode.dev/how-to-use-multiple-git-hub-accounts-in-a-single-system-using-ssh-key-in-linuxubuntu</link><guid isPermaLink="true">https://shyam-dadhaniya.hashnode.dev/how-to-use-multiple-git-hub-accounts-in-a-single-system-using-ssh-key-in-linuxubuntu</guid><category><![CDATA[GitHub]]></category><category><![CDATA[Git]]></category><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[Shyam Dadhaniya]]></dc:creator><pubDate>Thu, 09 Feb 2023 05:19:04 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/wX2L8L-fGeA/upload/5ee1f091adff1eb6aba85213a7609b24.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The majority of developers could find it necessary to operate many GitHub accounts on a single computer. On the same machine, for instance, you might run both your personal projects' GitHub account and the account for your organization.</p>
<p>It only takes a fairly straightforward combination of ssh and git setup to implement this. For users of LINUX/UNIX, follow the instructions below.</p>
<h1 id="heading-1-open-terminal">1. Open Terminal</h1>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qvjsmgzgnnphj1f4mahj.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-2-generating-the-ssh-keys">2. Generating the SSH keys</h1>
<p><strong>Step-1: Write the following command:</strong> <code>$ ssh-keygen</code></p>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fwehgk34cbjtqj52j9dv.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p>After that command it should look like this:</p>
<p>  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yzaollqcsc4dawe91lxo.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
<p><strong>Step-2: Write your folder path as shown below image:</strong></p>
<ul>
<li>In the below image, I've written <code>youraccount</code> for the path, in that, you can write any name as per your requirement (yourname_work).</li>
</ul>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9te9u1b25bsdn0xp17x.png" alt /></p>
<ul>
<li><p>Now for a passphrase, we need to put it empty for now.</p>
</li>
<li><p>Once you enter an empty passphrase the next step is <strong>Enter the same passphrase again</strong> in that we put the empty passphrase again.</p>
</li>
</ul>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5p1p9ji1d903rjvdehpx.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p>Now, go to the .ssh folder.</p>
</li>
<li><p>Run the below command: <code>cat</code><a target="_blank" href="http://youraccount.pub"><code>youraccount.pub</code></a></p>
</li>
</ul>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cwbm9791i2zaryt25zwk.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p>Copy the key starting with <strong>ssh-rsa</strong></p>
</li>
<li><p>Go to your github account in the web browser and then go to the settings tabs as shown in the figure below.</p>
</li>
</ul>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3amvw4z1hp914cqk91p4.png" alt class="image--center mx-auto" /></p>
<ul>
<li>Now go to the <strong>SSH and GPG key</strong> tab as shown below image:</li>
</ul>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ksjp82nrrmeprfwjua6c.png" alt class="image--center mx-auto" /></p>
<ul>
<li>Click on the <strong>New SSH key</strong> button</li>
</ul>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ioopcijuh13n6p3g5l69.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p>You will be able to see the below screen:</p>
<ol>
<li><p><strong>name:</strong> (as per your wish)</p>
</li>
<li><p><strong>key:</strong> paste the key which we've copied from the .ssh folder</p>
</li>
</ol>
</li>
</ul>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6jrk8mhirsg4hxwx0d5a.png" alt class="image--center mx-auto" /></p>
<ul>
<li>Open the config file which is present in the .ssh folder in your preferred code editor.</li>
</ul>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1gr1gq3oz33x5kuoq41c.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p>The above-mentioned steps let you generate and configure an ssh key.</p>
</li>
<li><p>You can follow these same steps as mentioned above to generate more ssh keys and configure it accordingly to set multiple ssh keys in the very same system.</p>
</li>
<li><p>Copy the below code and paste it into the config file. Make changes in your host, hostname, and identity file as per your requirement.</p>
</li>
</ul>
<pre><code class="lang-plaintext">#First generated and configured account with ssh key
Host github.com-shyam_work
 HostName github.com
 IdentityFile ~/.ssh/shyam-work


 #Further generated and configured account with ssh key
 Host github.com-shyam_personal
  HostName github.com
  IdentityFile ~/.ssh/shyam-personal
</code></pre>
<h1 id="heading-3-clone-repo"><strong>3. Clone</strong> Repo</h1>
<p><code>git clone git@github.com-shyam_work:git-account-name/git-ssh-testing.git</code></p>
<p><code>git clone git@github.com-shyam_personal:git-account-name/git-ssh-testing.git</code></p>
<p>Happy Coding...</p>
]]></content:encoded></item></channel></rss>