> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/dsx-air/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/dsx-air/_mcp/server.

# air_sdk.endpoints.ssh_keys

Stub file for ssh\_keys endpoint type hints.

## Classes

| Name                                                              | Description                                         |
| ----------------------------------------------------------------- | --------------------------------------------------- |
| [`SSHKey`](#air_sdkendpointsssh_keyssshkey)                       | SSH Key model representing a user's SSH public key. |
| [`SSHKeyEndpointAPI`](#air_sdkendpointsssh_keyssshkeyendpointapi) | API client for SSH key endpoints.                   |

## Module Contents

```python
class air_sdk.endpoints.ssh_keys.SSHKey
```

**Bases**: `air_sdk.air_model.AirModel`

SSH Key model representing a user's SSH public key.

The string representation shows: id, name

```python
id: str
```

Unique identifier for the SSH key

```python
created: datetime.datetime
```

Timestamp when the SSH key was created

```python
name: str
```

Human-readable name for the SSH key

```python
fingerprint: str
```

SSH key fingerprint (automatically generated)

```python
get_model_api() -> type[SSHKeyEndpointAPI]
```

```python
model_api: SSHKeyEndpointAPI
```

```python
delete() -> None
```

Delete this SSH key.

After deletion, the instance's id will be set to None.

**Example:**

```python
>>> ssh_key = api.ssh_keys.get('key-id')
>>> ssh_key.delete()
```

```python
class air_sdk.endpoints.ssh_keys.SSHKeyEndpointAPI
```

**Bases**: `air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.ssh_keys.SSHKey]`

API client for SSH key endpoints.

```python
API_PATH: str
```

```python
model: type[SSHKey]
```

```python
list(
    *,
    limit: int = ...,
    offset: int = ...,
    ordering: str = ...,
    search: str = ...
) -> Iterator[SSHKey]
```

List all SSH keys with optional filtering.

**Parameters:**

* `limit` – Maximum number of results to return per page
* `offset` – The initial index from which to return the results
* `ordering` – Order objects by field. Prefix with "-" for desc order
* `search` – Search by name

**Returns:**

Iterator of SSHKey instances

**Example:**

```python
>>> # List all SSH keys
>>> for key in api.ssh_keys.list():
...     print(key.name, key.fingerprint)

>>> # Search by name
>>> for key in api.ssh_keys.list(search='my-key'):
...     print(key.name)

>>> # Order by name descending
>>> for key in api.ssh_keys.list(ordering='-name'):
...     print(key.name)
```

```python
create(
    *,
    name: str,
    public_key: str
) -> SSHKey
```

Create a new SSH key.

**Parameters:**

* `name` – Human-readable name for the SSH key
* `public_key` – The SSH public key content (e.g., "ssh-rsa AAAA...")

**Returns:**

The created SSHKey instance

**Example:**

```python
>>> ssh_key = api.ssh_keys.create(
name='my-laptop-key', public_key='ssh-rsa AAAAB3NzaC1yc2EAAAADAQAB...'
)
>>> print(ssh_key.fingerprint)
```

```python
get(pk: PrimaryKey) -> SSHKey
```

Get a specific SSH key by ID.

**Parameters:**

* `pk` – The SSH key ID (string or UUID)

**Returns:**

The SSHKey instance

**Example:**

```python
>>> ssh_key = api.ssh_keys.get('key-id')
>>> print(ssh_key.name, ssh_key.fingerprint)
```

```python
delete(pk: PrimaryKey) -> None
```

Delete an SSH key by ID.

**Parameters:**

* `pk` – The SSH key ID (string or UUID)

**Returns:**

None

**Example:**

```python
>>> # Delete by ID
>>> api.ssh_keys.delete('key-id')
```