# SSH Keys API

SSH key management endpoints.

## Authentication

All endpoints require authentication (session cookie).

---

## GET /ssh-keys

**Description:** List all SSH keys for the current user.

### Response

#### Success (200 OK)

```json
[
  {
    "id": "uuid",
    "name": "GitHub Work",
    "public_key": "ssh-ed25519 AAAAC3NzaC... user@example.com",
    "created_at": "2024-01-01T00:00:00Z"
  }
]
```

**Note:** Private keys are never returned.

---

## POST /ssh-keys

**Description:** Generate a new SSH key pair.

### Request

#### Request Body

```json
{
  "name": "GitHub Personal"
}
```

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | `string` | Yes | Key name/label |

### Response

#### Success (201 Created)

```json
{
  "id": "uuid",
  "name": "GitHub Personal",
  "public_key": "ssh-ed25519 AAAAC3NzaC... user@example.com",
  "created_at": "2024-01-01T00:00:00Z"
}
```

**Note:** The private key is generated and stored securely. It is not returned in the response.

---

## DELETE /ssh-keys/{id}

**Description:** Delete an SSH key.

### Response

#### Success (204 No Content)

**Note:** This permanently deletes both public and private keys.
