Article Background
Back to Knowledgebase

How to Access SSH and SFTP on Your DirectAdmin Website

Web
Cubes Support
July 20, 2026

Accessing your web hosting account via SSH (Secure Shell) or SFTP (SSH File Transfer Protocol) allows you to manage website files, run command-line tools (like Composer, Git, or WP-CLI), and securely upload large website archives to your /public_html/ directory.

This guide will show you how to enable SSH access in DirectAdmin, connect via SFTP using FileZilla or Cyberduck, and log in to the command line using terminal commands or SSH keys.


Connection Credentials Overview

To connect via SSH or SFTP, use your main DirectAdmin account credentials:

  • Host / Server: yourdomain.com (or your server hostname, e.g. web.cubes.host)
  • Protocol: SFTP - SSH File Transfer Protocol
  • Port: 22 (or custom SSH port 2222 if specified in your welcome email)
  • Username: Your main DirectAdmin Username (e.g. user123)
  • Password: Your DirectAdmin Account Password

Method 1: Connecting via SFTP (FileZilla, Cyberduck, or WinSCP)

SFTP encrypts all file transfers, making it far more secure than legacy plain-text FTP.

Using FileZilla:

  1. Open FileZilla on your computer.
  2. Go to File > Site Manager and click New Site.
  3. Set Protocol to SFTP - SSH File Transfer Protocol.
  4. Fill in your connection details:
    • Host: yourdomain.com (or server IP)
    • Port: 22
    • Logon Type: Normal
    • User: Your DirectAdmin Username
    • Password: Your DirectAdmin Password
  5. Click Connect.
  6. Once connected, open the public_html folder on the right-hand remote window. This is where your website's HTML, PHP, and WordPress files live!

Method 2: Connecting via SSH Terminal (Command Line)

SSH access allows developers to execute terminal commands directly on the server.

Connecting on macOS or Linux Terminal:

Open your terminal application and run:

(Replace username with your DirectAdmin username and yourdomain.com with your domain).

Connecting on Windows (PowerShell or PuTTY):

  • Windows Terminal / PowerShell: Type ssh [email protected] -p 22 and enter your password when prompted.
  • PuTTY: Enter yourdomain.com in Host Name, set Port to 22, set Connection Type to SSH, and click Open.

SSH keys eliminate the need to type your password when logging in, providing bank-grade security.

1. Generate or Paste an SSH Key in DirectAdmin

  1. Log in to your Cubes Hosting DirectAdmin Control Panel.
  2. Navigate to Advanced Features > SSH Keys (or Account Manager > SSH Keys).
  3. Click Paste Key to paste your local public key (id_rsa.pub or id_ed25519.pub).
  4. Click Create or Authorize.

2. Connect Using Your Private Key

ssh -i ~/.ssh/id_rsa [email protected] -p 22

File Permission Best Practices

When uploading or modifying website files via SFTP or SSH, ensure proper file permissions to prevent web server 403 Forbidden or 500 Internal Server errors:

  • Directories / Folders: Set permissions to 755 (drwxr-xr-x).
  • Files (.html, .php, .css): Set permissions to 644 (-rw-r--r--).
  • Web Root Location: Always upload your live site code into /public_html/.

Conclusion

SSH and SFTP give you total developer control over your DirectAdmin web hosting account. Connect using SFTP Port 22 in FileZilla, authorize your SSH keys, and manage your website code securely!

Special Offer

Ready to Start Your Server?

Get 10% OFF your first month on any server with promo code CUBES10 at checkout!

24/7 Assistance

Need Help With Your Server?

Already a Cubes Hosting customer and couldn't find your answer? Our dedicated support team is available 24/7.