# Generate SSH private-public key pair

## Linux / Windows / MAC

Open terminal and enter the following command, substituting in your GitHub email address.

```bash
$ ssh-keygen -t ed25519 -C "your_email@example.com"
```

> If you are using a legacy system that doesn't support the Ed25519 algorithm, use:

```bash
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
```

You'll be asked to choose the file location, here you can choose a custom name as well. If want to keep default name and location simply press enter key.

```bash
> Enter a file in which to save the key (/c/Users/you/.ssh/custom_name):[Press enter]
```

Then you'll need to type in and confirm a password/passphrase to protect your ssh keys, if you wish you may just press enter for no password/passphrase.

> You will not see anything as you type, nonetheless, characters are still being captured so continue as normal.

```bash
> Enter passphrase (empty for no passphrase): 
> Enter same passphrase again: 
```

Now your SSH key pair is ready to go.

## Reference Links

* <https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-configure-GitLab-SSH-keys-for-secure-Git-connections>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dojo.lkmx.io/ingles/open-ssh/generate-ssh-private-public-key-pair.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
