> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SSH Keys

SSH keys are used to securely access your Bare Metal servers and Containers. You can import your existing SSH public key or let the system auto-generate a key pair for you.

## Access SSH Keys Management

1. Click your **avatar** in the top right corner
2. Select **"Member List"** from the dropdown menu to access Settings

<img src="https://mintcdn.com/gmicloud/4bKHcorHjG5NZU1D/assets/homepage-avatar-menu.png?fit=max&auto=format&n=4bKHcorHjG5NZU1D&q=85&s=ecdf310377b7214870778684c702dca9" alt="homepage-avatar-menu.png" width="3024" height="1442" data-path="assets/homepage-avatar-menu.png" />

3. Click **"SSH Keys"** in the left sidebar under the "Organization" section

<img src="https://mintcdn.com/gmicloud/C_oWKvRRJe0Ppct5/assets/ssh-keys-navigation.png?fit=max&auto=format&n=C_oWKvRRJe0Ppct5&q=85&s=98ce8a3bb843dbbe9ceb75812e4afbff" alt="ssh-keys-navigation.png" width="3024" height="1442" data-path="assets/ssh-keys-navigation.png" />

## Add a New SSH Key

1. Click the **"Add new key"** button in the top right corner

<img src="https://mintcdn.com/gmicloud/C_oWKvRRJe0Ppct5/assets/ssh-keys-add-button.png?fit=max&auto=format&n=C_oWKvRRJe0Ppct5&q=85&s=0ba7e56d1478757ea59de0a3c78e7057" alt="ssh-keys-add-button.png" width="3024" height="1442" data-path="assets/ssh-keys-add-button.png" />

2. Enter a **Name** for your SSH key
3. Choose a **Creation Mode**:

### Option 1: Import an Existing Key

Select **"Import"** to use your existing SSH public key:

1. Paste your SSH public key in the **SSH Key** field
2. Click **"Create"** to save

<img src="https://mintcdn.com/gmicloud/C_oWKvRRJe0Ppct5/assets/ssh-keys-add-dialog.png?fit=max&auto=format&n=C_oWKvRRJe0Ppct5&q=85&s=16057bcec255cd05128fb4d9c0b7ef58" alt="ssh-keys-add-dialog.png" width="3024" height="1442" data-path="assets/ssh-keys-add-dialog.png" />

<Tip>
  To get your SSH public key, run `cat ~/.ssh/id_rsa.pub` or `cat ~/.ssh/id_ed25519.pub` in your terminal.
</Tip>

### Option 2: Auto-create a Key Pair

Select **"Auto-create"** to let the system generate a key pair for you:

1. The system will automatically generate both public and private keys
2. Click **"Create"** to proceed
3. **Download both keys** in the next step - the private key will only be shown once

<img src="https://mintcdn.com/gmicloud/C_oWKvRRJe0Ppct5/assets/ssh-keys-add-dialog-auto.png?fit=max&auto=format&n=C_oWKvRRJe0Ppct5&q=85&s=11621491f194f314b8b3d481bbe7a7a4" alt="ssh-keys-add-dialog-auto.png" width="3024" height="1442" data-path="assets/ssh-keys-add-dialog-auto.png" />

<Warning>
  Make sure to download and securely store your private key. It will not be shown again after you close the dialog.
</Warning>

## Delete an SSH Key

1. Locate the SSH key you want to delete in the list
2. Click the **"Delete"** button in the Actions column

<img src="https://mintcdn.com/gmicloud/C_oWKvRRJe0Ppct5/assets/ssh-keys-delete-button.png?fit=max&auto=format&n=C_oWKvRRJe0Ppct5&q=85&s=9b161801e2af8da85c277719d40f98f5" alt="ssh-keys-delete-button.png" width="3024" height="1442" data-path="assets/ssh-keys-delete-button.png" />

<Warning>
  Deleting an SSH key will prevent access to any resources that use this key. Make sure you have alternative access methods before deleting.
</Warning>

## Using SSH Keys

Once you have added an SSH key, you can select it when:

* **Creating a Bare Metal server**: In Step 5 (Basic Information), select your SSH key from the dropdown
* **Creating a Container**: SSH access is available for official templates with port 22 exposed

After your resource is running, connect using:

```bash theme={null}
ssh root@<public-ip> -i /path/to/your/private-key
```
