How to Connect to cPanel Server via SSH
Overview
This guide explains how to connect to your cPanel server using SSH (Secure Shell) on custom port 1394 from various operating systems. SSH provides secure command-line access to manage your hosting account directly.
Prerequisites
Before connecting via SSH, ensure you have:
- cPanel Username: Your cPanel login username
- cPanel Password: Your cPanel account password
- Server Hostname/IP: Your server's domain name or IP address
- Port Information: Port 1394 (custom SSH port)
- Firewall Rules: Ensure port 1394 is not blocked by your local firewall
Windows
Method 1: Using PuTTY (Recommended)
PuTTY is a free, popular SSH client for Windows.
Step 1: Download and Install PuTTY
- Download PuTTY from the official website: https://www.putty.org
- Run the installer and follow the installation wizard
- Launch PuTTY from the Start Menu
Step 2: Configure Connection
- Open PuTTY
- In the Host Name (or IP address) field, enter your server's hostname or IP address
- In the Port field, change from
22 to 1394
- Ensure Connection type is set to
SSH
- (Optional) In the Saved Sessions field, enter a name like "My cPanel Server" and click Save
Step 3: Connect to Server
- Click Open to initiate the connection
- If prompted with a security alert (first time only), click Yes to accept the server's host key
- When prompted for login as:, enter your cPanel username
- Press Enter, then type your cPanel password (characters won't display while typing)
- Press Enter to log in
Method 2: Using Windows Terminal / PowerShell (Windows 10/11)
Windows 10 and 11 include a built-in OpenSSH client.
Step 1: Open Windows Terminal or PowerShell
- Press
Windows + X
- Select Windows Terminal or PowerShell
Step 2: Connect via SSH
Enter the following command:
ssh -p 1394 [email protected]
Replace:
username with your cPanel username
your-server.com with your server's hostname or IP address
Step 3: Authenticate
- Type
yes if prompted to accept the host key (first connection only)
- Enter your cPanel password when prompted
- Press Enter to log in
Method 3: Using WSL (Windows Subsystem for Linux)
If you have WSL installed:
- Open WSL terminal
- Use the Linux SSH command:
ssh -p 1394 [email protected]
macOS
Method 1: Using Terminal (Built-in)
macOS includes a built-in SSH client accessible through Terminal.
Step 1: Open Terminal
- Press
Command + Space to open Spotlight
- Type "Terminal" and press Enter
- Or navigate to Applications ? Utilities ? Terminal
Step 2: Connect via SSH
Enter the following command:
ssh -p 1394 [email protected]
Replace:
username with your cPanel username
your-server.com with your server's hostname or IP address
Step 3: Authenticate
- Type
yes if prompted about host authenticity (first connection only)
- Enter your cPanel password when prompted
- Press Enter to log in
Method 2: Using iTerm2 (Enhanced Terminal)
iTerm2 is a popular terminal replacement with additional features:
- Download iTerm2 from https://iterm2.com
- Install and open iTerm2
- Use the same SSH command:
ssh -p 1394 [email protected]
Creating an SSH Alias (Optional)
To simplify future connections, add an alias to ~/.ssh/config:
- Open Terminal
- Create/edit the SSH config file:
nano ~/.ssh/config
- Add the following configuration:
Host cpanel
HostName your-server.com
Port 1394
User username
- Save (Control + O) and exit (Control + X)
- Connect using:
ssh cpanel
Linux
Using Terminal (All Distributions)
All Linux distributions include SSH client by default.
Step 1: Open Terminal
- Ubuntu/Debian: Press
Ctrl + Alt + T
- Fedora/RHEL: Press
Alt + F2, type gnome-terminal
- KDE: Press
Alt + F2, type konsole
- Or find Terminal in your applications menu
Step 2: Connect via SSH
ssh -p 1394 [email protected]
Replace:
username with your cPanel username
your-server.com with your server's hostname or IP address
Step 3: Authenticate
- Type
yes if prompted about host authenticity
- Enter your cPanel password
- Press Enter to log in
Advanced Options
Verbose Mode (for troubleshooting)
ssh -v -p 1394 [email protected]
Specify Identity File (if using SSH keys)
ssh -p 1394 -i ~/.ssh/id_rsa [email protected]
Mobile Devices
iOS (iPhone/iPad)
Recommended Apps:
- Termius (Free with paid features)
- Download from App Store
- Tap + New Host
- Enter:
- Alias: My cPanel Server
- Hostname: your-server.com
- Port: 1394
- Username: your-cpanel-username
- Password: your-cpanel-password
- Tap Save and then connect
-
Prompt 3 (Paid)
- Professional SSH client
- Similar configuration process
-
iSH Shell (Free)
- Linux-like terminal
- Use standard SSH command:
ssh -p 1394 [email protected]
Android
Recommended Apps:
- JuiceSSH (Free)
- Download from Google Play Store
- Tap Connections ? +
- Configure:
- Nickname: My cPanel Server
- Type: SSH
- Address: your-server.com
- Port: 1394
- Identity: New ? enter username and password
- Save and connect
-
Termux (Free)
- Full Linux terminal emulation
- Install OpenSSH:
pkg install openssh
- Use standard SSH command:
ssh -p 1394 [email protected]
-
ConnectBot (Free, Open Source)
Chrome OS (Chromebook)
Using Built-in Terminal
- Press
Ctrl + Alt + T to open Crosh
- Type
shell to enter developer shell (if enabled)
- Use the SSH command:
ssh -p 1394 [email protected]
Using SSH Extension
- Install "Secure Shell" extension from Chrome Web Store
- Launch the extension
- Configure:
- Username: your-cpanel-username
- Hostname: your-server.com
- Port: 1394
- Click Connect
Troubleshooting Common Issues
Connection Refused
Error: ssh: connect to host your-server.com port 1394: Connection refused
Solutions:
- Verify the correct port number (1394)
- Ensure SSH is enabled for your account
- Check if your IP is whitelisted in the server firewall
- Contact your hosting provider
Permission Denied
Error: Permission denied, please try again
Solutions:
- Verify your cPanel username (case-sensitive)
- Ensure you're using your cPanel password, not email password
- Try resetting your cPanel password
Connection Timeout
Error: ssh: connect to host your-server.com port 1394: Connection timed out
Solutions:
- Check your internet connection
- Verify the server hostname/IP address
- Ensure port 1394 is not blocked by your local firewall or ISP
- Try using the IP address instead of hostname
Host Key Verification Failed
Error: Host key verification failed
Solution:
Remove the old host key and try again:
ssh-keygen -R "[your-server.com]:1394"
Slow Connection or Lag
Solutions:
- Use compression:
ssh -C -p 1394 [email protected]
- Check your internet connection speed
- Try connecting from a different network
Security Best Practices
- Use Strong Passwords: Ensure your cPanel password is strong and unique
- Enable Two-Factor Authentication: enable 2FA in cPanel
- Use SSH Keys: Consider setting up SSH key authentication instead of password
- Keep Software Updated: Ensure your SSH client is up-to-date
- Use Trusted Networks: Avoid SSH connections from public WiFi
- Logout Properly: Always type
exit or logout when finished
Setting Up SSH Keys (Recommended)
For enhanced security, consider using SSH keys instead of passwords:
- Generate an SSH key pair on your local machine:
ssh-keygen -t rsa -b 4096
- Copy the public key to your server:
ssh-copy-id -p 1394 [email protected]
- Or manually add it via cPanel:
- Login to cPanel
- Navigate to Security ? SSH Access
- Click Manage SSH Keys
- Import or generate keys
Common SSH Commands After Login
Once connected, here are useful commands:
# Check disk usage
df -h
# List files and directories
ls -la
# Navigate to public_html
cd public_html
# Check running processes
ps aux
# View PHP configuration
php -i
# Check server information
uname -a
# Exit SSH session
exit
Additional Tips
Save Connection Profiles
Most SSH clients allow saving connection profiles for quick access:
- PuTTY: Save sessions with custom names
- Terminal/Linux: Use SSH config file
- Mobile Apps: Save as favorites/bookmarks
Using SSH with cPanel File Manager
You can use SSH to:
- Upload/download files using
scp or sftp
- Edit files with
nano or vim
- Manage databases with
mysql command
- Run cron jobs manually for testing
SFTP Connection
You can also use SFTP (SSH File Transfer Protocol) on port 1394:
sftp -P 1394 [email protected]
Getting Help
If you continue experiencing issues:
- Check cPanel SSH Documentation: Look for SSH setup guides in your cPanel
- Contact Support: Reach out to your hosting provider with:
- Your cPanel username
- The specific error message
- Your IP address (visit whatismyip.com)
- Operating system and SSH client used
- Verify Account Status: Ensure your account is active and SSH is enabled
- Check Service Status: Ask if there are any ongoing SSH service issues
Summary
Connecting to your cPanel server via SSH on port 1394 is straightforward once configured properly:
- Use the appropriate SSH client for your operating system
- Specify port 1394 in your connection settings
- Authenticate with your cPanel username and password
- Follow security best practices
Remember to always logout properly when finished and consider using SSH keys for enhanced security.