SSH access gives you direct command line access to your hosting environment. This is essential for tasks like Composer, WP-CLI, or manual file editing. At Theory7, you can easily activate SSH access via DirectAdmin. In this guide, we explain exactly how it works.

Why SSH Access?

With SSH, you can:

  • Use Composer for PHP packages
  • Run WP-CLI for WordPress management
  • Use Git for version control
  • Quickly upload files via SCP/SFTP
  • Perform database tasks via command line
  • View logs in real-time

SSH is much more powerful than a web interface for many tasks. It allows you to work faster and more efficiently, especially if you regularly make changes or perform updates on your server. Additionally, SSH provides a secure way to connect to your server, as it uses encryption to protect your data.

Requirements

  • An active hosting account with Theory7
  • DirectAdmin access
  • An SSH client on your computer

For most users, an SSH client like PuTTY (for Windows) or the built-in terminal (for Mac and Linux) is sufficient. Make sure you have these tools installed before proceeding.

Activating SSH via DirectAdmin

Step 1: Log in to DirectAdmin

Go to your DirectAdmin panel:

https://yourdomain.com:2222

Log in with your hosting credentials. Make sure to keep this information secure, as it grants access to your hosting environment.

Step 2: Go to SSH Keys

  1. Click on Account Manager in the menu
  2. Select SSH Keys

This is where you manage SSH keys for your account. It is important to regularly check and manage your keys, especially if you have multiple servers or accounts.

Step 3: Create SSH Key

You have two options:

Option A: Generate Key in DirectAdmin

  1. Click Create Key Pair
  2. Enter a name for the key
  3. Select key type (Ed25519 recommended)
  4. Optional: add a passphrase for extra security
  5. Click Create

Download the private key and keep it secure. It is crucial not to share your private key with others, as it grants access to your server.

Option B: Upload Existing Key

If you already have an SSH key:

  1. Click Import Key
  2. Paste your public key
  3. Click Submit

Step 4: Authorize Key

After the key is created or imported:

  1. Find the key in the list
  2. Click on Authorize

The key is now active for SSH connections. Remember that you need to repeat this step if you add new keys or modify existing keys.

Connecting via SSH

Connection Details

At Theory7, you use:

  • Host: yourdomain.com (or server hostname)
  • Port: 7777 (not the default 22)
  • User: your DirectAdmin username

Connect

ssh username@yourdomain.com -p 7777

Or with a specific key:

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

Using a specific key is especially useful if you have multiple keys for different servers. This prevents confusion and makes management easier.

Generate SSH Key (Locally)

If you do not have an SSH key yet:

On Mac/Linux

ssh-keygen -t ed25519 -C "your@email.com"

You can find the public key in:

cat ~/.ssh/id_ed25519.pub

On Windows (PowerShell)

ssh-keygen -t ed25519 -C "your@email.com"

Or use PuTTYgen for generating keys. This is a graphical tool that simplifies the process, especially for users with less experience with the command line.

Create SSH Config (Optional)

For easier connections, create an SSH config:

nano ~/.ssh/config

Add:

Host myhosting
    HostName yourdomain.com
    User username
    Port 7777
    IdentityFile ~/.ssh/id_ed25519

Now you can connect with:

ssh myhosting

This saves time and makes it easier to connect to your server, especially if you connect regularly.

SFTP Access

With SSH, you also automatically have SFTP access. Connect with an SFTP client like FileZilla:

  • Host: sftp://yourdomain.com
  • Port: 7777
  • Protocol: SFTP
  • Logon Type: Key file

With SFTP, you can easily upload and download files, which is handy for managing your website or application.

Troubleshooting

Permission Denied

  • Check if the key is authorized in DirectAdmin
  • Check if you are using the correct username
  • Check if you are using the correct port (7777)

Connection Refused

  • Verify that SSH is enabled for your account
  • Check if the server hostname/IP is correct
  • Try using the IP address instead of the domain

Key Not Accepted

  • Make sure you are using the private key (not public)
  • Check key permissions: chmod 600 ~/.ssh/id_ed25519
  • Verify that the public key is correctly imported

Requesting SSH Access

Not all hosting packages have SSH access by default. If you do not see SSH Keys in DirectAdmin:

  1. Open a support ticket
  2. Request SSH access
  3. We will activate this for your account

Requesting SSH access may take some time, so be patient and ensure you provide all necessary information.

Need Help?

We are here for you! Are you facing any issues or have questions? Our support team is happy to assist you personally. Send us a message via the ticket system - we usually respond within a few hours and are happy to help.