Most people interact with their hosting account through cPanel's graphical interface - clicking through the File Manager, using phpMyAdmin, creating email accounts through forms. That works fine for day-to-day tasks. But when you need to do something at scale - search and replace across a database, run WP-CLI commands, manage files in bulk, or tail a live error log - the command line via SSH is dramatically faster and more capable.
What SSH Is and Why You Might Need It
SSH (Secure Shell) is an encrypted protocol that lets you connect to your server and run commands directly. Instead of clicking through a web interface, you type commands into a terminal window and interact with your server in real time.
Common reasons to use SSH on a hosting account:
- Running WP-CLI to update WordPress, plugins, or themes in bulk
- Moving or renaming large numbers of files without waiting for a browser-based file manager
- Running a find and replace on a WordPress database (via WP-CLI's
search-replacecommand) - Tailing error logs in real time to diagnose a problem
- Importing or exporting large SQL databases faster than phpMyAdmin allows
- Using Git for version-controlled deployments
Enabling SSH Access in cPanel
SSH access is not always enabled by default on shared hosting. In your cPanel:
- Navigate to Security > SSH Access (or search for "SSH" in the cPanel search bar)
- If SSH is not enabled, look for a button to request or enable access - or contact your hosting support
- From the SSH Access page, you can also manage SSH keys (more on that below)
Some hosts require you to contact support to enable SSH for your account. dotCanada customers can request SSH access through the support ticket system.
Connecting via Terminal on Mac or Linux
On macOS or Linux, SSH is built in. Open the Terminal app and run:
ssh yourusername@yourdomain.ca
Replace yourusername with your cPanel username and yourdomain.ca with your domain or server hostname. Your hosting welcome email will have the correct hostname if you are unsure.
You will be prompted for your cPanel password. Once authenticated, you will see a command prompt indicating you are connected to your server.
Connecting via PuTTY on Windows
On Windows, the most common SSH client is PuTTY, available free at putty.org. Download and run it, then:
- Enter your hostname or IP address in the Host Name field
- Make sure Port is set to 22 and Connection type is SSH
- Click Open
- Enter your username and password when prompted
Newer versions of Windows 10 and 11 also include a built-in SSH client you can use directly from Command Prompt or PowerShell: ssh yourusername@yourdomain.ca
Basic Commands You Will Actually Use
Once connected, these are the commands that cover the majority of everyday tasks:
ls # List files in the current directory
ls -la # List all files including hidden ones, with details
cd folder # Change into a directory
cd .. # Go up one level
pwd # Print current directory path
cp file.txt backup.txt # Copy a file
mv file.txt newname.txt # Rename or move a file
rm file.txt # Delete a file (no recycle bin - be careful)
tail -f logs/error_log # Watch the error log update in real time
To navigate to your WordPress installation (usually in public_html):
cd ~/public_html
Running WP-CLI Commands
WP-CLI is a command-line tool for managing WordPress. If it is available on your server (it is pre-installed on most quality hosting plans), it is one of the most powerful tools available to you.
wp core update # Update WordPress core
wp plugin update --all # Update all plugins
wp theme update --all # Update all themes
wp search-replace 'old.ca' 'new.ca' # Database-wide search and replace
wp user list # List all WordPress users
wp cache flush # Clear the object cache
Run wp --info to confirm WP-CLI is installed and working.
Security Best Practices
Use SSH key authentication. Instead of logging in with a password, you generate a key pair (a private key on your computer and a public key on the server). This is significantly more secure than password authentication because there is no password to steal or brute-force.
In cPanel's SSH Access section, you can generate a key pair and the public key will be stored in your ~/.ssh/authorized_keys file. You then download the private key to your machine and tell your SSH client to use it.
Disable password authentication once keys are configured. On a VPS where you control the SSH configuration, this is a meaningful security step. On shared hosting, the host manages this at the server level.
Log out when done. Type exit or press Ctrl+D to close your SSH session. Do not leave open sessions running indefinitely.
SSH is one of those tools that feels intimidating until you have used it a few times. Once you are comfortable with it, you will find it indispensable.

