Add Your SSH Key to DirectAdmin for Secure Access

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

Prerequisites

Before you start, make sure you have,

  • DirectAdmin Access: You should have 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. Follow this guide to open the terminal: https://wiki.crowncloud.net/?How_to_Access_the_Terminal_in_Directadmin

  • If you prefer to connect via SSH, follow the steps from this guide.

Generate 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 this guide:

Note: Follow Step 1 from the guide above depending on your local system (Linux or Windows Based).

If you are using Standard Theme on your DirectAdmin please click the following dropdown, change to Refreshed theme as shown here

In Standard Theme

Click here To add your SSH key in DirectAdmin panel, log in to the DirectAdmin Web Control Panel. Navigate to Advanced features → SSH Keys Click on Paste Key Paste your public SSH key in the box provided. You can optionally add a comment to label the key for future reference. 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. Click Create to save the SSH key. DirectAdmin will now allow SSH logins using your key.


In Refreshed Theme

To add your SSH key in DirectAdmin panel, we first log in to the DirectAdmin Web Control Panel.

Navigate to Advanced features → SSH Keys

First

Click on Paste Key

First

Paste your Public Key in the text field provided.
You can optionally add a comment to label the key for future reference. Example:

ssh-rsa AAAAB4xew...9x5Cg== user@your_machine

ssh-rsa AAAAB4xew...9x5Cg==</code> is your public key (truncated here for clarity). user@your_machine</code> is the comment, typically indicating which device or user the key belongs to.

First

Click on Create to complete the setup.

Once done, your server will accept SSH login using your key instead of a password.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS