How to Configure SSH Access and Generate SSH Keys in cPanel

53 views
Short answer: Access cPanel SSH Access, click 'Manage SSH Keys', generate or import your public key, authorize it, and connect via terminal using port 22.

Generate RSA/ECDSA public-private key pairs, manage key authorization, and securely connect via SSH or SFTP to Sib Host servers.

Quick reference

SSH Port 22 (Default SSH)
Environment CloudLinux CageFS (Secure jailed virtual shell)
Terminal Tool cPanel > Advanced > Terminal

Steps

  1. Open SSH Access: In cPanel, scroll to Security > SSH Access.
  2. Generate New Key Pair:
    • Click Manage SSH Keys > Generate a New Key.
    • Key Name: Keep default id_rsa.
    • Key Password: Set a strong passphrase.
    • Key Type: RSA. Key Size: 4096 bits.
    • Click Generate Key.
  3. Authorize Public Key (CRITICAL STEP):
    • Under Public Keys, locate your new key and click Manage.
    • Click Authorize. Uncertified keys cannot be used to establish connections.
  4. Download Private Key: Under Private Keys, click View/Download next to your key. You can also convert it to .ppk format for PuTTY directly in this screen.
  5. Connect via Terminal: Run:
    ssh -i /path/to/private_key -p 22 cpaneluser@yourdomain.com

Connect to Server using SSH Key from Client Terminal

# Connect securely with your private key and the server port
ssh -i ~/.ssh/id_rsa -p 22 USERNAME@SERVER_IP

Troubleshooting and tips

  • Permission Denied (publickey): Verify that you clicked Authorize on the public key inside cPanel. Also ensure your local private key permissions are set to 600 (chmod 600 id_rsa).
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket
Was this article helpful?
No, I need more help
Didn't find your answer?
Under 3 minutes
Submit Support Ticket