SSH (Secure Shell) access allows secure remote connections to your hosting server. It's commonly used for file management, running commands, managing databases, and making server-level changes via the command line. This guide explains how to enable, configure, and use SSH access through cPanel.
What Is SSH Access?
SSH is a secure network protocol that enables encrypted remote access to a server. It is typically used for:
-
File management and transfers
-
Running scripts and server commands
-
Managing databases and configurations
Communication over SSH is encrypted, providing a secure channel between your device and the server.
Managing SSH Access in cPanel
Step 1: Log in to cPanel
-
Open your browser and go to your cPanel login URL (e.g., https://yourdomain.com/cpanel).
-
Enter your username and password.
-
Click Log in.
Step 2: Open the SSH Access Tool
-
In the cPanel dashboard, locate the Security section.
-
Click SSH Access.
Step 3: Enable SSH Access (if required)
-
If SSH is not already enabled for your account, contact your hosting provider.
-
Some hosting plans offer SSH access by default; others may require an upgrade.
Step 4: Generate an SSH Key
-
On the SSH Access page, click Manage SSH Keys.
-
Click Generate a New Key.
-
Fill in the following details:
-
Key Name: Leave blank to use the default.
-
Key Password: Create a strong password.
-
Key Type: Select RSA.
-
Key Size: Choose 2048 or 4096.
-
-
Click Generate Key.
The new key will be listed under both Public Keys and Private Keys.
Step 5: Authorize the Public Key
-
In the Public Keys section, find your newly created key.
-
Click Manage, then select Authorize.
Step 6: Download the Private Key
-
In the Private Keys section, click View/Download next to the key.
-
Enter the key password to decrypt it.
-
Click Download Key and save it securely.
Connecting to the Server Using SSH
Option 1: Using PuTTY (Windows)
-
Download and install PuTTY.
-
Open PuTTY and configure the following:
-
Host Name: Your server’s IP address or hostname.
-
Port: 22
-
-
In the left menu, go to Connection > SSH > Auth.
-
Click Browse and select your private key file (.ppk).
-
Click Open to initiate the connection.
Option 2: Using Terminal (macOS/Linux)
Use the following command in your terminal:
ssh -i /path/to/private-key username@server_ip
Replace:
-
/path/to/private-key with the path to your key file
-
username with your cPanel username
-
server_ip with the server’s IP address
Accept the server’s fingerprint and enter your key password when prompted.
Managing SSH Keys
Change SSH Key Passphrase
-
Go to Manage SSH Keys.
-
Locate your private key.
-
Click Change Passphrase, enter the new password, and confirm.
Revoke SSH Access
-
In the Public Keys section, locate the key.
-
Click Manage, then select Revoke Authorization or delete the key entirely.
Best Practices for SSH Access
-
Use a strong passphrase to secure your private key.
-
Restrict SSH by IP using a firewall or IP whitelisting.
-
Rotate SSH keys regularly for security hygiene.
-
Disable password authentication on the server if possible, using only key-based login.
For any issues or assistance with SSH access, feel free to contact Lanetti support. We're here to ensure secure and seamless server management for your hosting needs!