SSH Keys

  • May 11, 2026
  • 0 Comments

Managing SSH Keys in DirectAdmin

Summary
This guide explains how to create, upload, and manage SSH keys in DirectAdmin. SSH keys allow secure, password‑less access to your hosting account or server.

Overview
SSH keys use a public/private key pair.  
- The **public key** is stored in DirectAdmin.  
- The **private key** stays on your computer and must never be shared.  

Once configured, SSH keys provide stronger security than passwords and simplify login automation.

Requirements
- DirectAdmin user-level access
- SSH enabled on the server
- An existing SSH key pair (or generate one on your device)

Step-by-Step Instructions

1. Access SSH Keys
- Log in to DirectAdmin
- Go to Advanced Features → SSH Keys
- Select the user account you want to manage

2. Add a Public Key
- Click “Add SSH Key”
- Paste your **public key** (example: ssh-ed25519 AAAAC3NzaC1…)
- Give the key a name (optional)
- Click “Create”

Supported key types:
- ed25519 (recommended)
- RSA (2048–4096 bits)

3. Enable or Disable a Key
- Go to SSH Keys
- Find the key in the list
- Toggle “Enable” or “Disable”
Disabled keys remain stored but cannot be used to log in.

4. Delete a Key
- Locate the key in the list
- Click “Delete”
- Confirm removal
This immediately revokes access for that key.

5. Generate SSH Keys (If Needed)
You can generate keys on your device:

Windows (PowerShell):
ssh-keygen -t ed25519 -C "yourname"

macOS / Linux:
ssh-keygen -t ed25519

Your keys will be created in:
~/.ssh/id_ed25519  
~/.ssh/id_ed25519.pub

6. Test SSH Access
Use your private key to connect:

ssh -i ~/.ssh/id_ed25519 username@yourdomain.com

If successful, you will not be prompted for a password.

Troubleshooting

Permission Denied (Publickey)
- Ensure the public key is correctly pasted
- Confirm the key is enabled
- Check file permissions on your local ~/.ssh folder
- Verify you are using the correct username

SSH Still Asking for a Password
- Your private key may not be loaded into your SSH agent
- Use: ssh-add ~/.ssh/id_ed25519
- Ensure the server supports key authentication

Key Not Working After Regeneration
- Delete the old public key from DirectAdmin
- Add the new public key
- Restart your SSH agent locally

Multiple Keys Causing Conflicts
- Specify the key explicitly:
  ssh -i ~/.ssh/id_ed25519 username@yourdomain.com

Security Notes
- Never share your private key
- Use ed25519 for best security and performance
- Disable password login if your hosting provider allows it

Related Articles
- [PHP Settings](ca://s?q=PHP_Settings)
- [Apache Handlers](ca://s?q=Apache_Handlers)
- [Cron Jobs](ca://s?q=Cron_Jobs)
- [Directory Password Protection](ca://s?q=Directory_Password_Protection)
- [Custom Error Pages](ca://s?q=Custom_Error_Pages)

How helpful was this article to you?

Posting has been disabled.