StarDomain

Enabling and Using SSH in DirectAdmin

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

SettingValue
HostnameYour server hostname (shown in DirectAdmin or welcome email)
Port22
UsernameYour DirectAdmin username
PasswordYour DirectAdmin password

On macOS / Linux

Open Terminal and run:

bash
ssh [email protected]

Enter your password when prompted.

On Windows

Use PuTTY or the built-in Windows Terminal:

  1. Download and install PuTTY from putty.org
  2. Enter the hostname and port 22
  3. Click Open
  4. 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:

bash
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

bash
ssh-copy-id [email protected]

Or manually:

  1. Copy the contents of ~/.ssh/id_ed25519.pub
  2. Log in to the server via SSH with password
  3. Paste the key into ~/.ssh/authorized_keys

Step 3: Test Passwordless Login

bash
ssh [email protected]

You should be logged in without entering a password.

Common SSH Commands

CommandDescription
ls -laList files with details
cd directoryChange directory
pwdShow current directory
cp file1 file2Copy a file
mv file1 file2Move or rename a file
rm fileDelete a file
mkdir dirnameCreate a directory
nano filenameEdit a file
cat filenameView file contents
tail -f logfileWatch a log file in real time
du -sh directoryCheck directory size
mysql -u user -p dbnameConnect to MySQL
php -vCheck PHP version
node -vCheck 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

Need help? Contact our support team at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.