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

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue