Introduction

SSH Access in cPanel allows you to securely connect to your hosting server using the Secure Shell (SSH) protocol. SSH provides encrypted command-line access to your web server, enabling advanced users to perform file management, run scripts, manage databases, and execute administrative tasks with precision.

This article explains how to enable and connect to SSH via cPanel, and why it’s a vital tool for web hosting security and efficiency.


Why Use SSH Access?

SSH is useful for:

  • Secure file transfers via SFTP or command-line

  • Running command-line tools, scripts, and automation

  • Managing files and directories faster than through File Manager

  • Performing administrative tasks (cron jobs, permissions, backups)

  • Troubleshooting server-side issues remotely


Key Benefits

  • Encrypted connection to prevent data interception

  • Remote access to the server from anywhere

  • Faster workflows for developers and system admins

  • More control compared to using the cPanel GUI alone


How to Access SSH via cPanel

Step 1: Log in to cPanel

  1. Go to your cPanel account (e.g., yourdomain.com/cpanel)

  2. Scroll down to the Security section

  3. Click on SSH Access

Step 2: Manage SSH Keys

SSH authentication typically uses key pairs (public/private) for secure access.

To Generate a New SSH Key:
  1. Click Manage SSH Keys

  2. Click Generate a New Key

  3. Fill in:

    • Key Name (optional)

    • Key Password (recommended for security)

    • Key Type: RSA or ED25519 (RSA 2048+ is common)

    • Key Size: 2048 or 4096 bits

  4. Click Generate Key

Authorize the Key:
  1. After generation, go back to Manage SSH Keys

  2. Find your new key in the list and click Manage

  3. Click Authorize to allow SSH login


Step 3: Connect via SSH

Option 1: Using Terminal or Command Prompt

On Linux/macOS:

bash
CopyEdit
ssh username@yourdomain.com -p 22

On Windows (using PowerShell or Terminal):

bash
CopyEdit
ssh username@yourdomain.com

You must use your cPanel username and server IP or domain. If you're using a private key, specify the key path with -i.

Option 2: Using an SSH Client (e.g., PuTTY for Windows)

  1. Download and install PuTTY

  2. In Host Name, enter your domain or IP

  3. Port: 22 (or your host’s SSH port)

  4. Under SSH → Auth, browse to your private key file

  5. Click Open to start the session


Step 4: Secure Your Connection

  • Use key-based authentication instead of passwords for better security

  • Disable root login or password login (if managing your own VPS)

  • Change the default SSH port (if supported by your host)

  • Regularly rotate your keys and remove unused ones


Troubleshooting

Problem Solution
"Permission denied" Check if the key is authorized and matches your private key
Timeout or refused connection Ensure SSH is enabled on your hosting plan; check firewall settings
Key file format error Convert your .ppk file to .pem or use PuTTYgen for Windows

Conclusion

SSH Access in cPanel gives you a powerful, secure way to manage your server beyond the web interface. Whether you're deploying code, automating backups, or troubleshooting, SSH allows complete control — safely and efficiently. 

Was this answer helpful? 0 Users Found This Useful (0 Votes)