How to Securely Copy an Account Between Servers Using SSH Keys in cPanel & WHM

This article explains how to securely transfer a cPanel account from a source server to a destination server using SSH key authentication. It covers key generation, authorization, importing public keys, and performing the transfer through WHM’s Transfer Tool.

SSH key transfer,cPanel account migrationWHM Transfer Tool

~3 min read • Updated Feb 23, 2026

1. Overview


This guide describes how to securely copy a cPanel account from one server (the source server) to another (the destination server) using SSH keys. SSH key authentication provides a secure and efficient method for account transfers.


Definitions:

  • Destination server: The server receiving the copied account.
  • Source server: The server where the account currently exists.

Important:

  • Only use the public key on the source server. Never import the private key into the source server.
  • If you experience session timeout issues, increase the timeout value in:
    WHM » Server Configuration » Tweak Settings » System



2. Securely Copy an Account Using SSH Keys


Important: All steps must be performed as the root user.


Step 1 — Log in to the Destination Server


On the destination server, generate a new SSH key pair:

  1. Open WHM.
  2. Navigate to:
    WHM » Security Center » Manage root’s SSH Keys
  3. Generate a new SSH key pair.
  4. Authorize the key.
  5. Download the private key (keep it secure on the destination server).



Step 2 — Log in to the Source Server


Import the public key you generated on the destination server:

  1. Open WHM on the source server.
  2. Navigate to:
    WHM » Security Center » Manage root’s SSH Keys
  3. Click Import Key.
  4. Use a unique key name.
  5. If required, enter the key’s password.
  6. Paste the public key into the “Paste the Public Key” field.

Warning: Do not paste the private key. The private key must remain only on the destination server.


After importing:

  1. Click Import.
  2. Click Return to SSH Manager.
  3. Locate the key in the Public Keys table.
  4. Click Manage Authorization.
  5. Click Authorize.



Step 3 — Perform the Account Transfer


Return to the destination server and open the Transfer Tool:

  1. Navigate to:
    WHM » Transfers » Transfer Tool
  2. Enter the source server’s connection details.
  3. Under Login, select Root.
  4. Under Authentication Method, select SSH Public Key.
  5. Select the SSH key you generated earlier.
  6. If required, enter the SSH key passphrase.
  7. Proceed with the account transfer.



3. Conclusion


Using SSH keys to transfer accounts between servers enhances security and simplifies authentication. By generating a key pair on the destination server, importing only the public key to the source server, and using WHM’s Transfer Tool, you can securely migrate accounts with minimal risk.


Written & researched by Dr. Shahin Siami