How to Generate SSH Keys for WordPress Server Access
Create secure SSH key pairs for WordPress server authentication and deployment. Follow our comprehensive SSH keygen tutorial for secure WordPress hosting management on your VPS or cloud server.
Overview
SSH keys provide secure passwordless authentication for WordPress server access and deployment automation. CloudPloy uses SSH key authentication to establish encrypted connections between your local development environment and production WordPress servers, enabling secure file transfers, automated deployments, and remote server management. This comprehensive SSH key generation guide covers creating RSA and Ed25519 key pairs for WordPress hosting on VPS, cloud servers, and dedicated hosting environments.
What are SSH Keys for WordPress Hosting?
SSH keys are cryptographic key pairs essential for secure WordPress server management, deployment automation, and DevOps workflows:
- Private Key: Your secret key for WordPress server authentication (keep secure on your local machine)
- Public Key: Shared with CloudPloy and WordPress servers for passwordless SSH login
- Use Cases: Automated WordPress deployments, WP-CLI remote commands, secure file transfers, Git deployments
Quick Start: Generate SSH Key for WordPress Server
Generate a secure Ed25519 SSH key for WordPress server access with this command:
ssh-keygen -t ed25519 -C "your_email@example.com" This creates a modern Ed25519 key pair ideal for WordPress hosting security, automated deployments, and server management tasks.
SSH Key Generation Tutorial by Operating System
macOS
- 1. Open Terminal
Press
Cmd + Space, type "Terminal", and press Enter. - 2. Generate SSH Key for WordPress Server Access
Create your SSH key pair for secure WordPress hosting management:
ssh-keygen -t ed25519 -C "your_email@example.com"For legacy WordPress hosting environments or older SSH servers, generate an RSA key:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com" - 3. Choose Key Location
When prompted, press Enter to accept the default location:
Enter file in which to save the key (/Users/you/.ssh/id_ed25519): [Press enter] - 4. Set Passphrase (Optional)
Enter a secure passphrase or press Enter for no passphrase:
Enter passphrase (empty for no passphrase): [Type a passphrase] Enter same passphrase again: [Type passphrase again] - 5. Add to SSH Agent
Start the SSH agent and add your key:
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519 - 6. Copy Public Key
Copy your public key to clipboard:
pbcopy < ~/.ssh/id_ed25519.pubYour public key is now in your clipboard, ready to paste into CloudPloy!
Windows
Option 1: Windows Terminal / PowerShell (Recommended)
- 1. Open PowerShell or Windows Terminal
Right-click Start button → Windows Terminal or PowerShell
- 2. Generate SSH Key
Run the following command:
ssh-keygen -t ed25519 -C "your_email@example.com" - 3. Follow the Prompts
Accept default location and optionally set a passphrase.
- 4. Copy Public Key
Display and copy your public key:
type $env:USERPROFILE.sshid_ed25519.pub
Option 2: Git Bash
- 1. Install Git for Windows
Download from git-scm.com if not already installed.
- 2. Open Git Bash
Right-click in any folder → Git Bash Here
- 3. Follow macOS Instructions
The commands are identical to macOS from this point.
Linux
- 1. Open Terminal
Use
Ctrl + Alt + Tor search for Terminal in your applications. - 2. Generate SSH Key
Run the following command:
ssh-keygen -t ed25519 -C "your_email@example.com" - 3. Add to SSH Agent
Start the SSH agent and add your key:
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519 - 4. Copy Public Key
Display your public key:
cat ~/.ssh/id_ed25519.pubSelect and copy the output to add to CloudPloy.
Add SSH Key to CloudPloy for WordPress Deployment
- 1 Access CloudPloy WordPress Hosting Dashboard
Navigate to SSH key management in your WordPress hosting control panel.
- 2 Click "Add SSH Key"
Look for the SSH key management section.
- 3 Add Public SSH Key for Server Authentication
Paste your public key (ssh-ed25519 or ssh-rsa) for WordPress server access.
- 4 Name Your Key
Give it a descriptive name like "MacBook Pro" or "Work Laptop".
- 5 Save
Click save to add the key to your CloudPloy account.
SSH Key Security Best Practices for WordPress Hosting
Do's
- ✓ Use Ed25519 keys for modern WordPress hosting security
- ✓ Set passphrases for production WordPress server keys
- ✓ Create separate keys for staging and production WordPress environments
- ✓ Backup private keys for WordPress deployment continuity
- ✓ Rotate keys quarterly for WordPress security compliance
Don'ts
- ✗ Never expose private keys in WordPress repos or backups
- ✗ Avoid weak RSA keys for WordPress server security
- ✗ Don't reuse keys across multiple WordPress hosting providers
- ✗ Never commit SSH keys to WordPress Git repositories
- ✗ Avoid storing keys in WordPress uploads directory
Troubleshooting SSH Key Issues for WordPress Servers
SSH Permission Denied on WordPress Server
Fix SSH key permissions for WordPress server access:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub SSH Agent Not Running
Start the SSH agent manually:
eval "$(ssh-agent -s)" Managing Multiple WordPress Server SSH Keys
Configure SSH for multiple WordPress hosting environments:
# ~/.ssh/config
# Production WordPress Server
Host wp-production
HostName your-server.cloudploy.com
User root
IdentityFile ~/.ssh/id_ed25519_cloudploy_prod
# Staging WordPress Server
Host wp-staging
HostName staging.cloudploy.com
User root
IdentityFile ~/.ssh/id_ed25519_cloudploy_staging Security Reminder
- Private keys must remain secure on your local development machine
- Only upload public keys to WordPress hosting control panels
- Rotate keys immediately if WordPress server security is compromised
- Use passphrases for production WordPress deployment keys
- Enable two-factor authentication on WordPress hosting accounts
Next Steps for WordPress Server Management
With your SSH key generated, you're ready for secure WordPress deployments, automated backups, and professional server management with CloudPloy!