# Credentials

> Connect securely to instances, automate with the CLI, and pull private images.

This page shows how to add, use and remove SSH keys, API keys and registry credentials. You manage all three on the console's [Credentials page](https://console.cloud.featherless.ai/credentials/ssh-keys).

<table>
<thead>
  <tr>
    <th>
      Credential
    </th>
    
    <th>
      What it's for
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      SSH key
    </td>
    
    <td>
      Connecting to instances with SSH.
    </td>
  </tr>
  
  <tr>
    <td>
      API key
    </td>
    
    <td>
      Using the CLI.
    </td>
  </tr>
  
  <tr>
    <td>
      Registry credentials
    </td>
    
    <td>
      Pulling private container images.
    </td>
  </tr>
</tbody>
</table>

---

## Add an SSH key

SSH keys let you connect to running instances with your own SSH client. Each key belongs to you, and every instance in your organization accepts the keys of all its members.

<tabs sync="interface">
<tabs-item label="Console">

1. Open the [Credentials page](https://console.cloud.featherless.ai/credentials/ssh-keys) and select the **SSH keys** tab.
2. Click **Add key**.
3. Paste your public key into **Public key**, for example the contents of `~/.ssh/id_ed25519.pub`, and click **Add key**.

</tabs-item>

<tabs-item label="CLI">

```bash
featherless-cloud ssh-keys add
featherless-cloud ssh-keys add ~/.ssh/work.pub --name work-laptop
```

</tabs-item>
</tabs>

---

## Create an API key

API keys let the CLI and your scripts act as you. You can create and revoke them only in the console.

1. Open the [Credentials page](https://console.cloud.featherless.ai/credentials/api-keys) and select the **API keys** tab.
2. Click **Create key**.
3. Enter a **Name**, choose **Scopes** and an expiry under **Expires**, and click **Create key**.
4. Copy the key.

<warning>

Featherless GPU Cloud doesn't store your API key, so save it somewhere secure, such as your password manager or a CI secret. Treat your API key like a password and don't share it with anyone.

</warning>

### Choose scopes

<table>
<thead>
  <tr>
    <th>
      Scope
    </th>
    
    <th>
      Read
    </th>
    
    <th>
      Write
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Instances
      </strong>
    </td>
    
    <td>
      View instances, Run Jobs, logs, metrics and network volumes.
    </td>
    
    <td>
      Also create, change and delete them, and open terminals.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Account
      </strong>
    </td>
    
    <td>
      View your profile, templates, SSH keys and registry credentials.
    </td>
    
    <td>
      Also change them.
    </td>
  </tr>
</tbody>
</table>

Write includes read. Give each script or person its own key with the narrowest scopes it needs, so you can revoke one without affecting the others.

A key acts in the organization that was active when you created it. To use another organization, switch to it in the console and create a key there.

### Revoke a key

Open the key's actions menu, click **Revoke key**, and confirm. Anything using the key stops working immediately.

Keys belonging to instances with the CLI installed are hidden unless you switch on **Show instance keys**. They end when their instance stops. See [Use the CLI in an instance](/instances/cli-access).

---

## Add registry credentials

Registry credentials let instances and Run Jobs pull private container images. They belong to the organization, and only owners and admins can add, change or remove them.

<tabs sync="interface">
<tabs-item label="Console">

1. Open the [Credentials page](https://console.cloud.featherless.ai/credentials/registries) and select the **Registries** tab.
2. Click **Add credentials**.
3. Enter a **Name**, the **Registry** hostname (for example `ghcr.io`), a **Username**, and a **Password or access token**.
4. Click **Save credentials**.

</tabs-item>

<tabs-item label="CLI">

```bash
echo "$GHCR_TOKEN" | featherless-cloud registry-keys add ghcr --server ghcr.io --username my-user --password-stdin
```

</tabs-item>
</tabs>

Use an access token with read-only pull access where your registry supports it. When you deploy, **Automatic** picks a matching credential for the image's registry, or you can choose one. See [Custom images](/templates/custom-images).

A credential that running instances use can't be deleted, and its registry can't be changed.

## Next steps

<card-group>
<card icon="i-lucide-plug" title="Connect to an instance" to="/instances/connect">

Use your SSH key, the browser terminal or the CLI.

</card>

<card icon="i-lucide-terminal" title="Install the CLI" to="/cli">

Sign in with an API key.

</card>

<card icon="i-lucide-container" title="Custom images" to="/templates/custom-images">

Run your own image from a private registry.

</card>
</card-group>
