# Adding new SSH key to it

### Adding new SSH key to your GitHub account:

* Open Your "Command prompt" or "Terminal".
* Type below commands to generate SSH key

```
ssh-keygen
```

* Now a **.ssh** folder is created in your home directory. Go to that directory.

```
cd .ssh
cat id_rsa.pub
```

* copy the SSH key which we get after running the above commands.

<figure><img src="https://3868804918-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FegsIWleSdyH9rMLJ8ShI%2Fuploads%2Fgit-blob-b05c103216c54d150604886c0bd033c24cc4ef21%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* open GitHub and add this SSH key as shown below:
* open **Settings** and go to **SSH and** **GPG keys**

<figure><img src="https://3868804918-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FegsIWleSdyH9rMLJ8ShI%2Fuploads%2Fgit-blob-18f020c1c9e5afcbc7455e08aaf6855585a770d3%2Fimage%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3868804918-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FegsIWleSdyH9rMLJ8ShI%2Fuploads%2Fgit-blob-18afdd9908447f05f4601a084531b009a5dbe85f%2FScreenshot%20from%202022-12-02%2017-05-20.png?alt=media" alt=""><figcaption></figcaption></figure>

* Click on **New SSH key** and paste it. Click on **Add SSH key**.
* If you want check the private key, use

```
cat id_rsa
```
