> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Add Your SSH Key to DirectAdmin for Secure Access

Using SSH key authentication adds a layer of security to your server login. This guide helps you generate an SSH key on your local computer and add it to your **DirectAdmin** panel for secure access.

:::info

If you are using the Standard theme on DirectAdmin, expand the Standard theme section below and follow those steps. To switch to the Refreshed theme, see [How to change theme or layout on DirectAdmin](https://wiki.crowncloud.net/?How_to_change_theme_or_layout_on_DirectAdmin).

:::

## Prerequisites

Before you start, make sure you have:

- **DirectAdmin access:** access to your DirectAdmin control panel with appropriate permissions.
- **Server access via terminal:** you can access your server using the built-in terminal in DirectAdmin. To open it, see [How to Access the Terminal in DirectAdmin](https://wiki.crowncloud.net/?How_to_Access_the_Terminal_in_Directadmin).
- If you prefer to connect via SSH, follow the steps in the same guide.

## Generate an SSH Key on Your Local System

Whether you're using Linux or Windows, you can generate an SSH key to securely access your server. To generate the key, follow the instructions in [Secure Server Access](https://wiki.crowncloud.net/?How_to_Setup_Key_based_Authentication_for_your_Linux_Server_for_Secure_Server_Access).

:::note

Follow Step 1 of that guide, depending on your local system (Linux-based or Windows-based).

:::

## In the Refreshed Theme


### Log in to DirectAdmin
Log in to the DirectAdmin Web Control Panel.
### Open SSH Keys
Navigate to **Advanced Features** > **SSH Keys**.
<img alt="SSH Keys under Advanced Features" src={image0} />
### Click Paste Key
Click on **Paste Key**.
<img alt="Paste Key button" src={image1} />
### Paste your public key
Paste your **public key** in the text field provided. You can optionally add a comment to label the key for future reference. For example:
```
ssh-rsa AAAAB4xew...9x5Cg== user@your_machine
```
- `ssh-rsa AAAAB4xew...9x5Cg==` is your **public key** (truncated here for clarity).
- `user@your_machine` is the **comment**, typically indicating which device or user the key belongs to.
<img alt="Public key field" src={image2} />
### Create the key
Click **Create** to complete the setup. Your server will now accept SSH logins using your key instead of a password.

## In the Standard Theme


Click here to show the steps

### Log in to DirectAdmin
Log in to the DirectAdmin Web Control Panel.
### Open SSH Keys
Navigate to **Advanced Features** > **SSH Keys**.
<img alt="SSH Keys under Advanced Features" src={image3} />
### Click Paste Key
Click on **Paste Key**.
<img alt="Paste Key button" src={image4} />
### Paste your public key
Paste your public SSH key in the box provided. You can optionally add a comment to label the key for future reference. For example:
```
ssh-rsa AAAAB4xew...9x5Cg== user@your_machine
```
- `ssh-rsa AAAAB4xew...9x5Cg==` is your **public key** (truncated here for clarity).
- `user@your_machine` is the **comment**, typically indicating which device or user the key belongs to.
<img alt="Public key field" src={image5} />
### Create the key
Click **Create** to save the SSH key. DirectAdmin will now allow SSH logins using your key.
