# Generating SSH keys

This guide provides step-by-step instructions for creating and copying SSH elliptic curve keys on Windows, macOS, and Linux.

### Generating SSH Keys

Run the following command to generate an Ed25519 SSH key pair:

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

When prompted:

* Select a save location (default: `~/.ssh/id_ed25519`)
* Enter a passphrase or press Enter to skip

#### Copy Your Public Key

**Mac/Linux:**

```bash
cat ~/.ssh/id_ed25519.pub | pbcopy
```

**Windows (PowerShell):**

```powershell
Get-Content ~\.ssh\id_ed25519.pub | Set-Clipboard
```

> The public key (`id_ed25519.pub`) is safe to share and is used for authentication. Keep the private key (`id_ed25519`) confidential and secure. **Do not share it.**


---

# 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://docs.cngn.co/getting-started/security/generating-ssh-keys.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.
