<?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: Shyam-Dadhaniya</title>
    <description>The latest articles on DEV Community by Shyam-Dadhaniya (@shyamdadhaniya_89).</description>
    <link>https://dev.to/shyamdadhaniya_89</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%2F786558%2F384c2b84-bcf4-4c6b-884d-f4b4212ab8d3.jpeg</url>
      <title>DEV Community: Shyam-Dadhaniya</title>
      <link>https://dev.to/shyamdadhaniya_89</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shyamdadhaniya_89"/>
    <language>en</language>
    <item>
      <title>Difference Between React Router DOM v5 &amp; v6</title>
      <dc:creator>Shyam-Dadhaniya</dc:creator>
      <pubDate>Tue, 25 Apr 2023 05:27:42 +0000</pubDate>
      <link>https://dev.to/shyamdadhaniya_89/difference-between-react-router-dom-v5-v6-2j2f</link>
      <guid>https://dev.to/shyamdadhaniya_89/difference-between-react-router-dom-v5-v6-2j2f</guid>
      <description>&lt;ul&gt;
&lt;li&gt;React does not have built in routing solutions that’s why we need to reach out for an external library. And most popular and reliable option out there is react-router. And v6 is just the latest and greatest option with bunch of cool new features and custom hooks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install react-router-dom@6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Routes is replaced with Switch:&lt;/strong&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;In react router dom v6 switch is no longer available switch is replaced with the Routes in react router dom v6.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// old - v5
import { BrowserRouter, Switch, Route } from 'react-router-dom';
const App = () =&amp;gt; {
  return (
    &amp;lt;BrowserRouter&amp;gt;
      &amp;lt;Switch&amp;gt;
        &amp;lt;Route exact path="/" component={HomePage} /&amp;gt;
        &amp;lt;Route path="/users" component={Users} /&amp;gt;
      &amp;lt;/Switch&amp;gt;
    &amp;lt;/BrowserRouter&amp;gt;
  );
}

// new - v6
import { BrowserRouter, Routes, Route } from 'react-router-dom';
const App = () =&amp;gt; {
  return (
    &amp;lt;BrowserRouter&amp;gt;
      &amp;lt;Routes&amp;gt;
        &amp;lt;Route path="/" element={&amp;lt;HomePage /&amp;gt;} /&amp;gt;
        &amp;lt;Route path="users" element={&amp;lt;Users /&amp;gt;} /&amp;gt;
      &amp;lt;/Routes&amp;gt;
    &amp;lt;/BrowserRouter&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.&lt;strong&gt;Route component is replaced with Route element&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you notice in the above example, in the new version we are passing a react element instead of a component. This is so much better, now we can pass props directly to the element.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// old - v5
&amp;lt;Route path="/"&amp;gt;
  &amp;lt;HomePage/&amp;gt;
&amp;lt;/Route&amp;gt;
-----------or------------
&amp;lt;Route path="/" component={HomePage} /&amp;gt;

// new - v6
&amp;lt;Route path=”/” element={&amp;lt;HomePage/&amp;gt;}/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.&lt;strong&gt;Exact is no longer available:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React router v6 doesn't support exact anymore. As stated in their documentation: You don't need to use an exact prop anymore. This is because all paths match exactly by default.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// old - v5
&amp;lt;Route path="/"  exact component={HomePage} /&amp;gt;

// new - v6
&amp;lt;Route path=”/” element={&amp;lt;HomePage/&amp;gt;}/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.&lt;strong&gt;Redirect is replaced with Navigate:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Redirect is no longer available in React Router Dom v6. Instead, the library offers a new component called Navigate that serves a similar purpose.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// old - v5
import { BrowserRouter, Switch, Route, Redirect } from 'react-router-dom';
const App = () =&amp;gt; {
  return (
    &amp;lt;BrowserRouter&amp;gt;
      &amp;lt;Switch&amp;gt;
        &amp;lt;Route exact path="/" exact&amp;gt;
            &amp;lt;Redirect to="/welcome"&amp;gt;
        &amp;lt;/Route&amp;gt;
        &amp;lt;Route path="/welcome" component={Welcome} /&amp;gt;
        &amp;lt;Route path="/users" component={Users} /&amp;gt;
      &amp;lt;/Switch&amp;gt;
    &amp;lt;/BrowserRouter&amp;gt;
  );
}

// new - v6
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
const App = () =&amp;gt; {
  return (
    &amp;lt;BrowserRouter&amp;gt;
      &amp;lt;Routes&amp;gt;
        &amp;lt;Route path="/" element={&amp;lt;Navigate to= "/welcome" /&amp;gt;} /&amp;gt;
        &amp;lt;Route path="/welcome" element={&amp;lt;Welcome /&amp;gt;} /&amp;gt;
        &amp;lt;Route path="users" element={&amp;lt;Users /&amp;gt;} /&amp;gt;
      &amp;lt;/Routes&amp;gt;
    &amp;lt;/BrowserRouter&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5.&lt;strong&gt;NavLink:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;NavLink component is a useful tool for creating navigation links that indicate which page the user is currently on, and it provides several props that can be used to customize the behavior and styling for that particular navlink.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;exact prop: In version 5, you can use the exact prop to ensure that the link is only active when the current URL matches exactly. In version 6, this functionality is achieved using the end prop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the previous version we could set a seperate class or a style object for the time when the  would be active. In V6, these two props are removed, instead in case of Nav Links className and style props, work a bit differently. They take a function which in turn gives up some information about the link, for us to better control the styles.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// old - v5
&amp;lt;NavLink
  to="/news"
  style={{ color: 'black' }}
  activeStyle={{ color: 'blue' }}&amp;gt;
&amp;lt;/NavLink&amp;gt;

&amp;lt;NavLink
  to="/news"
  className="nav-link"
  activeClassName="active"&amp;gt;
&amp;lt;/NavLink&amp;gt;

// new - v6
&amp;lt;NavLink
  to="/news"
  style={({isActive}) =&amp;gt; { color: isActive ? 'blue' : 'black' }}&amp;gt;
&amp;lt;/NavLink&amp;gt;

&amp;lt;NavLink
  to="/news"
 className={({ isActive }) =&amp;gt; (isActive ? "link active" : "link")}
&amp;lt;/NavLink&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;6.&lt;strong&gt;Outlet:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The Outlet component is used to render the child components of a route. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An  should be used in parent route elements to render their child route elements. This allows nested UI to show up when child routes are rendered.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function App() {
return (
  &amp;lt;Routes&amp;gt;
   &amp;lt;Route path="/" element={&amp;lt;Dashboard /&amp;gt;}&amp;gt;
     &amp;lt;Route path="messages" element {&amp;lt;DashboardMessages /&amp;gt;}/&amp;gt;
     &amp;lt;Route path="tasks" element={&amp;lt;DashboardTasks /&amp;gt;} /&amp;gt;
   &amp;lt;/Route&amp;gt;
    &amp;lt;/Routes&amp;gt;
  );
}


function Dashboard() {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;Dashboard&amp;lt;/h1&amp;gt;

      {/* This element will render either &amp;lt;DashboardMessages&amp;gt; when the URL is
          "/messages", &amp;lt;DashboardTasks&amp;gt; at "/tasks", or null if it is "/"
      */}
      &amp;lt;Outlet /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The summary of the outlet is simple placeholder which simply telling react route that where nested content, nested route content should be inserted.So this an alternative to define nested routes inside of other parent components.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;7.&lt;strong&gt;Form:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;React router dom provides Form component which  is useful for easiness of form handling.You have to provide method and action props to the Form component. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Action route must be same as route which have equivalent action method.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Action method receives object which have two properties params and request.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can get form-data from calling formData method on request object.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can also validate form data and return error object which you can access by using useActionData hook.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;This feature only works if using a data router like createBrowserRouter&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;----- App.js 

import "./styles.css";
import {
  createBrowserRouter,
  createRoutesFromElements,
  Route,
  RouterProvider
} from "react-router-dom";
import Home from "./Components/Home";
import Contact, { contactAction } from "./Components/Contact";

const router = createBrowserRouter(
  createRoutesFromElements(
    &amp;lt;Route&amp;gt;
      &amp;lt;Route path="/" element={&amp;lt;Home /&amp;gt;} /&amp;gt;
      &amp;lt;Route path="contact" element={&amp;lt;Contact /&amp;gt;} action={contactAction} /&amp;gt;
    &amp;lt;/Route&amp;gt;
  )
);
export default function App() {
  return &amp;lt;RouterProvider router={router} /&amp;gt;;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;----- Contact.jsx

import { Form, redirect, useActionData } from "react-router-dom";
const Contact = () =&amp;gt; {
  const Errordata = useActionData();
  return (
    &amp;lt;&amp;gt;
      &amp;lt;h3&amp;gt;Contact Us&amp;lt;/h3&amp;gt;
      &amp;lt;Form method="post" action="/contact"&amp;gt;
        &amp;lt;label&amp;gt;
          &amp;lt;span&amp;gt;Your Email: &amp;lt;/span&amp;gt;
          &amp;lt;input type="email" name="email" required /&amp;gt;
        &amp;lt;/label&amp;gt;
        &amp;lt;label&amp;gt;
          &amp;lt;span&amp;gt;Your Message: &amp;lt;/span&amp;gt;
          &amp;lt;input name="message" required /&amp;gt;
        &amp;lt;/label&amp;gt;
        &amp;lt;button&amp;gt;Submit&amp;lt;/button&amp;gt;
        {Errordata &amp;amp;&amp;amp; Errordata.error}
      &amp;lt;/Form&amp;gt;
    &amp;lt;/&amp;gt;
  );
};

export default Contact;

export const contactAction = async ({ request }) =&amp;gt; {
  console.log(request);
  const data = await request.formData();
  console.log(data);
  const submission = {
    email: data.get("email"),
    message: data.get("message")
  };

  console.log(submission);
  if (submission.message.length &amp;lt; 5) {
    return { error: "Message must be 5 charecter long" };
  }
  return redirect("/");
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For demo you can visit below github repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.tourl"&gt;&lt;code&gt;https://github.com/Shyam-Dadhaniya/react-router-v6&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy Coding 🚀&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>react</category>
      <category>router</category>
    </item>
    <item>
      <title>How to use multiple github accounts in a single system using SSH key in LINUX/UBUNTU</title>
      <dc:creator>Shyam-Dadhaniya</dc:creator>
      <pubDate>Fri, 03 Feb 2023 06:40:15 +0000</pubDate>
      <link>https://dev.to/shyamdadhaniya_89/how-to-use-multiple-git-hub-account-in-one-system-using-ssh-key-36hc</link>
      <guid>https://dev.to/shyamdadhaniya_89/how-to-use-multiple-git-hub-account-in-one-system-using-ssh-key-36hc</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;It only takes a fairly straightforward combination of ssh and git setup to implement this. For users of LINUX/UNIX, follow the instructions below.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Open Terminal
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fqvjsmgzgnnphj1f4mahj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fqvjsmgzgnnphj1f4mahj.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Generating the SSH keys
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step-1: Write the following command:&lt;/strong&gt; &lt;code&gt;$ ssh-keygen&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ffwehgk34cbjtqj52j9dv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ffwehgk34cbjtqj52j9dv.png" alt="Image description" width="800" height="525"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After that command it should look like this:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fyzaollqcsc4dawe91lxo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fyzaollqcsc4dawe91lxo.png" alt="Image description" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step-2: Write your folder path as show below image:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the below image I've written &lt;code&gt;youraccount&lt;/code&gt; for the path,  in that you can write any name as per your requirement (yourname_work). &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fa9te9u1b25bsdn0xp17x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fa9te9u1b25bsdn0xp17x.png" alt="Image description" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Now for passphrase we need to put it empty for now.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once you enter empty passphrase then next step is &lt;strong&gt;Enter same passphrase again&lt;/strong&gt; in that we put empty passphrase again&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F5p1p9ji1d903rjvdehpx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F5p1p9ji1d903rjvdehpx.png" alt="Image description" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Now, go to the .ssh folder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the below command: &lt;code&gt;cat youraccount.pub&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fcwbm9791i2zaryt25zwk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fcwbm9791i2zaryt25zwk.png" alt="Image description" width="800" height="544"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Copy the key starting with &lt;strong&gt;ssh-rsa&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to the your github account in the web browser and then go to the settings tabs as shown in the figure below.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F3amvw4z1hp914cqk91p4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F3amvw4z1hp914cqk91p4.png" alt="Image description" width="800" height="1091"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now go to the &lt;strong&gt;SSH and GPG key&lt;/strong&gt; tab as show in below image:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fksjp82nrrmeprfwjua6c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fksjp82nrrmeprfwjua6c.png" alt="Image description" width="645" height="1344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click on &lt;strong&gt;New SSH key&lt;/strong&gt; button&lt;br&gt;
&lt;a href="https://media2.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%2Fioopcijuh13n6p3g5l69.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fioopcijuh13n6p3g5l69.png" alt="Image description" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You will be able to see the below screen: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;name:&lt;/strong&gt;  (as per your wish)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;key:&lt;/strong&gt;  paste the key which we've copied from the .ssh folder
&lt;img src="https://media2.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%2F6jrk8mhirsg4hxwx0d5a.png" alt="Image description" width="800" height="499"&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the config file which is present in the .ssh folder in your preferred code editor.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F1gr1gq3oz33x5kuoq41c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F1gr1gq3oz33x5kuoq41c.png" alt="Image description" width="800" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The above mentioned steps lets you generate and configure an ssh key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the below code and paste it in the config file. Make changes in your host, hostname and identity file as per your requirement.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#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
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Clone Repo
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;git clone git@github.com-shyam_work:git-account-name/git-ssh-testing.git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git clone git@github.com-shyam_personal:git-account-name/git-ssh-testing.git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Happy Coding.. 😊&lt;/p&gt;

</description>
      <category>writing</category>
      <category>gratitude</category>
    </item>
  </channel>
</rss>
