This article will guide you through setting up SSH access for your WordPress hosting environment, allowing you to securely manage your website via command line tools like WP-CLI. You’ll learn how to generate SSH keys, add them to your hosting dashboard, and connect to your server securely on different operating systems.
TABLE OF CONTENTS
- What is SSH and Why Use It?
- Key Benefits of SSH Access
- How To Create Your SSH Key
- On macOS
- On Linux
- On Windows
- How To Add Your SSH Key to the Hosting Dashboard
- How To Connect to Your Server via SSH
- Common WP-CLI Commands
- Managing SSH Keys
- Frequently Asked Questions
What is SSH and Why Use It? #
SSH (Secure Shell) is a secure protocol that enables encrypted connections to your server. It’s ideal for advanced users who want direct access to server resources, offering greater control and automation possibilities for WordPress management.


Key Benefits of SSH Access #
SSH access offers several key advantages that improve server management and site security:
- Enables use of WP-CLI for faster, scriptable WordPress management
- Provides secure, encrypted server connections
- Allows direct file operations without needing FTP
- Facilitates automation and deployment workflows
- Supports multi-user, key-based authentication for teams
- Enhances security through passwordless, key-based login
How To Create Your SSH Key #
Creating an SSH key ensures only authorized devices can connect to your server. Follow the steps for your specific operating system.
On macOS #
You can quickly generate and copy your SSH key using Terminal.
- Open Terminal.
- Run: ssh-keygen -t rsa
- Press Enter through all prompts (no password required).
- Copy your key: pbcopy < ~/.ssh/id_rsa.pub

On Linux #
Generating and copying your SSH key is simple and secure on Linux.
- Open Terminal.
- Run: ssh-keygen -t rsa
- Accept defaults by pressing Enter.
- Install xclip if needed:
- Ubuntu: sudo apt install xclip
- Arch: sudo pacman -S xclip
- Fedora/CentOS: sudo yum -y install xclip
- Copy key: cat ~/.ssh/id_rsa.pub | xclip -sel clip
On Windows #
Windows users can create SSH keys using PowerShell.
- Open PowerShell.
- Run: ssh-keygen.exe -t rsa
- Press Enter through prompts.
- Copy key: Get-Content .ssh\id_rsa.pub | Set-Clipboard
How To Add Your SSH Key to the Hosting Dashboard #
Adding your SSH key authorizes your device for server access.
- Log in to your hosting dashboard.
- Navigate to Advanced Settings > Server Settings.
- Enable SSH Access.
- Go to SSH Keys Manager → click Import New Key.
- Paste your public key.
- Name your key (e.g. “Jane’s MacBook”).
- Click Import — system will authorize your key.

How To Connect to Your Server via SSH #
Connecting allows you to use terminal commands on your server.
- Get your Host/IP and Username from the dashboard.
- Open terminal.
- Run: ssh yourusername@yourhostip
- Confirm first-time connection with yes.
- Navigate to your WordPress directory:
- cd public_html

Common WP-CLI Commands #
These commands help manage your WordPress site efficiently:
- List plugins: wp plugin list
- Clear cache: wp cache flush
- Purge CDN cache: wp cdn purge
Managing SSH Keys #
You can manage keys for better security and flexibility:
- Delete unused keys anytime via SSH Keys Manager.
- Add keys for other devices/team members.
- Rotate keys regularly for enhanced security.
Frequently Asked Questions #
Q: What happens if I lose my private key?
You’ll need to generate a new key pair and re-add the public key.
Q: Can I use a password instead of a key?
No, key-based authentication is required for SSH on this hosting platform.
Q: How do I revoke access for a stolen device?
Delete the corresponding key from SSH Keys Manager immediately.
Q: Is SSH access available on all plans?
Please check your hosting plan details — some plans may not include SSH.