> For the complete documentation index, see [llms.txt](https://docs.denvrdata.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.denvrdata.com/docs/additional-information/faqs/using-github-with-ssh-keys.md).

# Using Github with SSH keys

## Generate a public/private RSA key pair <a href="#generate_a_publicprivate_rsa_key_pair" id="generate_a_publicprivate_rsa_key_pair"></a>

Skip to next step if you have an existing SSH key pair.

{% hint style="info" %}
Windows users can use either PowerShell, Windows Terminal, or WSL (Windows Subsystem for Linux).  Mac and Linux users should use their preferred terminal.
{% endhint %}

Run the `ssh-keygen` command with default arguments to generate and replace your private keypair.

```
ssh-keygen -t rsa
```

You will be prompted to provide a filename and an additional password if required.

{% hint style="info" %}
It is common to NOT use a password with the private key because the operating system already controls user access.
{% endhint %}

The output will look like this:

<figure><img src="/files/wv9CbVDpe5njQOQ2p02z" alt="" width="563"><figcaption></figcaption></figure>

## Copy the public key

Use the terminal to display the public key, highlight, and copy to clipboard.

{% hint style="danger" %}
The public key will have a .pub file extension.  You should never share your private key!
{% endhint %}

```
$ cd $HOME/.ssh
$ cat id_rsa.pub
```

The output will look similar to the following:

<figure><img src="/files/w8ECBlsEHiTfasvRgY60" alt=""><figcaption></figcaption></figure>

## Save the public key to GitHub

Navigate to 'Settings' under your GitHub profile.  In the Left navigation select 'SSH and GPG keys':

<figure><img src="/files/4Ux00wrE5pwZcwfp0fJa" alt="" width="172"><figcaption></figcaption></figure>

Select 'New SSH key', add a title with any descriptive name, and paste the public key into the Key textarea:

<figure><img src="/files/0uegvTn5OHva8qJi4WDn" alt="" width="375"><figcaption></figcaption></figure>

Your repos will now show clone commands using SSH:

<figure><img src="/files/MHTiE8CGUaLNF33BpoZ2" alt="" width="238"><figcaption></figcaption></figure>
