Enabling and Using SSH in DirectAdmin
SSH (Secure Shell) provides command-line access to your hosting account. You can use SSH to manage files, run scripts, install dependencies, manage databases, and perform advanced tasks.
SSH Access on Our Hosting
SSH access is available on all shared hosting plans (cPanel, DirectAdmin, and Webuzo) through CloudLinux. You do not need to upgrade to VPS for SSH access.
Connecting via SSH
Connection Details
| Setting | Value |
|---|---|
| Hostname | Your server hostname (shown in DirectAdmin or welcome email) |
| Port | 22 |
| Username | Your DirectAdmin username |
| Password | Your DirectAdmin password |
On macOS / Linux
Open Terminal and run:
ssh [email protected]Enter your password when prompted.
On Windows
Use PuTTY or the built-in Windows Terminal:
- Download and install PuTTY from putty.org
- Enter the hostname and port 22
- Click Open
- Enter your username and password
Or use Windows Terminal / PowerShell:
Setting Up SSH Keys (Passwordless Login)
Step 1: Generate an SSH Key Pair
On your local machine:
ssh-keygen -t ed25519 -C "[email protected]"Press Enter to accept the default file location. Optionally set a passphrase.
Step 2: Copy the Public Key to the Server
ssh-copy-id [email protected]Or manually:
- Copy the contents of
~/.ssh/id_ed25519.pub - Log in to the server via SSH with password
- Paste the key into
~/.ssh/authorized_keys
Step 3: Test Passwordless Login
ssh [email protected]You should be logged in without entering a password.
Common SSH Commands
| Command | Description |
|---|---|
ls -la | List files with details |
cd directory | Change directory |
pwd | Show current directory |
cp file1 file2 | Copy a file |
mv file1 file2 | Move or rename a file |
rm file | Delete a file |
mkdir dirname | Create a directory |
nano filename | Edit a file |
cat filename | View file contents |
tail -f logfile | Watch a log file in real time |
du -sh directory | Check directory size |
mysql -u user -p dbname | Connect to MySQL |
php -v | Check PHP version |
node -v | Check Node.js version |
File Paths
Your home directory: /home/username/
Website files: /home/username/domains/yourdomain.com/public_html/
Troubleshooting
Connection Refused
- Verify the hostname and port are correct
- Ensure SSH is enabled for your account
- Check if your IP has been blocked (contact support)
Permission Denied
- Verify your username and password
- If using SSH keys, check file permissions:
chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys
Connection Timeout
- Try connecting from a different network
- Your ISP may block port 22; try using a VPN
Related Articles
Need help? Contact our support team at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.