~3 دقیقه مطالعه • بروزرسانی ۴ اسفند ۱۴۰۴
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:
- Open WHM.
- Navigate to:
WHM » Security Center » Manage root’s SSH Keys - Generate a new SSH key pair.
- Authorize the key.
- 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:
- Open WHM on the source server.
- Navigate to:
WHM » Security Center » Manage root’s SSH Keys - Click Import Key.
- Use a unique key name.
- If required, enter the key’s password.
- 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:
- Click Import.
- Click Return to SSH Manager.
- Locate the key in the Public Keys table.
- Click Manage Authorization.
- Click Authorize.
Step 3 — Perform the Account Transfer
Return to the destination server and open the Transfer Tool:
- Navigate to:
WHM » Transfers » Transfer Tool - Enter the source server’s connection details.
- Under Login, select Root.
- Under Authentication Method, select SSH Public Key.
- Select the SSH key you generated earlier.
- If required, enter the SSH key passphrase.
- 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.
نوشته و پژوهش شده توسط دکتر شاهین صیامی